Blog

Google Tag Manager

Gravity Form Tracking with Google Tag Manager

Objective: Record all gravity form Interactions

Process:

There is no good way of linking Gravity Forms and GTM that is documented by either party.

I found a method devised by another power user that uses form submissions and started to follow that.

However, form tracking in the way he put it together does not work for us.

I suspect that is because multi-page gravity forms don’t have a submission until at the very end.

So, I devised a way that piggybacks on the tag generated when a Gravity Form(GF) is fired.

This tag is generated by placing a custom javascript event.

You can copy the contents below and it should work for you if you use jQuery[help link]

————————————————————————————————————————–

if(jQuery(‘.gform_confirmation_message’).is(“:visible”))/* page load */ { var formId=jQuery(‘.gform_confirmation_message’).attr(‘id’).replace(‘gform_confirmation_message_’,”); dataLayer.push({‘event’:’gform.submit.success’,’formId’:formId}); } jQuery(document).on(‘submit’,’form[id*=”gform_”]’,function(){/* for Ajax Load */ clearInterval(window.gsetInt); var formId=jQuery(this).attr(‘id’).replace(‘gform_’,”); jQuery(this).find(‘.gfield’).removeClass(‘gfield gfield_error ‘) window.gsetInt=setInterval(function(){ if(jQuery(‘.gform_confirmation_message_’+formId+’.gforms_confirmation_message,.gform_confirmation_message_’+formId+’.gform_confirmation_message’).is(“:visible”)) { clearInterval(window.gsetInt); dataLayer.push({‘event’:’gform.submit.success’,’formId’:formId}); } if(jQuery(‘#gform_fields_’+formId+’ .gfield_error’).is(“:visible”)) { clearInterval(window.gsetInt); dataLayer.push({‘event’:’gform.submit.error’,’formId’:formId}); } },200); });

————————————————————————————————————————–

Once you create the event, turn on the preview mode in GTM and see if the GFTrackEvent is firing.

This event works has the following content:

  1. That tag(“Gravity from custom tracking”) fires and creates an event called “GFTrackEvent”

gf_1

2. I created a trigger,”Find GFTrackEvent”, that fires after the above event fires

gf_2

3. I created a dataLayer variables to capture the label from “GFTrackEvent”. If needed,

you can also capture the action but we don’t need it right now.

GFTrackLabel

gf_3

4. I created another tag called  “Event Tracking Tag For Gravity Form” which stores the above dataLayer values

gf_4
This tag get fired when either “GFTrackEvent” occurs OR when we get to the lead thank you page.

5. The picture below shows them as events being recorded in Google Analytics.

gf_5

Result: The tracking of submission works and also includes the pages that were being paginated to.

Usage: We can use this pagination and lead capture in the dashboard stating now

Improvements Possible: If we want to track the exact options that a user chose on each of the

pages( apart from personal information which Google does not allow), then will have to pick up

information from click elements and somehow fire that as events.

Please let me know if you have any questions.

Analytics

Learning from Twitter

Three quick learning points from Twitter over the last month

  • Always follow back people who follow you.
    • if someone follows you, it is only decent to check out their twitter feed and follow them back if your interests match.
    • Re-tweet their pinned tweet or another prominent tweet that you read and liked. Yes, you need to make that effort. It will enrich your feed too.
    • Check out their followers and follow them too. This is not a contest on who has more followers but more an opportunity for you touch base with thought leaders in your domain.
  • Make sure you put an effort towards providing good content to your followers.
    • Everyday, I am devoting time to my mailing lists and emails to make sure that I can recommend some good reads to my followers.
    • Post images and constantly change the content of your pinned tweet. It garners more attention in Twitter world.
    • Without realizing it, you are running a daily newspaper. You don’t need to get frazzled but 4 to 5 good posts a day will keep your followers engaged.
    • This will show in re-tweets and replies and likes. I get on average 1, 1 and 3 respectively.
  • This is a great channel to build relationships.
    • You will be surprised how many people will write you directly and offer to help. Take them up on the offer and offer your own help. Do not talk money. We all know the difference between favors and paid work.
    • When re-tweeting, please try to mention your own take on the thread or link. It will help other in your list make sense of what is being talked about.

I hear a lot of conversation about monetizing social media channels and earning millions of dollars a month. Well, of course no one minds earning that kind of money. However, like everything else, this is an activity that requires a lot of effort. Take an hour or two a day to do this well.

My amazing experience with Twitter traffic started on Jan 20st, 2017 when my following suddenly rose  from 550 to 650 within a day. I was delighted but puzzled. I still am. My handle @ateeqhmad has been around for 7 years with barely anyone listening and then suddenly a huge jump.

It didn’t stop there either. By Feb 1st, 2017 , my followers were up beyond the 1,000 mark and are still slowly climbing everyday.  I had some great interactions with people; absorbed a lot of good ideas and learnt that this is a wonderful tool to interact with others.

There are several good Social Media tools out there. Use them if you have $20 a month to spare. However, I would advise against too much automation. It takes away from the spontaneity of life.

Most importantly, have fun!

Uncategorized

The education of an Analyst

There are really two streams that we can see these days coming out of Master’s programs. One is the marketing/product Analytics practitioner and the other is data science practitioner. At the initial levels we need to learn  both streams because it will not really be clear to a student where their capability or interests truly lie.

Based on this premise, I would like to suggest a few types of learning that web analyst in particular need to imbibe in the start of their careers.

Business Writing is factual journalism.

I have experienced a lot of analysts coming in with lots of capability with numbers but none with writing business stories. I also see many analysts who don’t know the first thing about how to use stats tests in real life situations. Simple questions like —  Did the pricing change lead to more leads? Are the results statistically significant? — make us all go into huddles and battle stations.

Several online course providers offer creative writingbusiness writing or journal writing courses and I think they should be part of any Analysts formative education.

Knowledge of the tools.

We need to provide hands-on understanding of the tools that are used in typical business analytics. I have seen a lot of spreadsheets(Excel wizardry can take you lots of places) being used.

There are some statistical packages like R(open sources and free, hence very useful), SPSS and SAS that the analyst should be familiar with. More importantly, they need to be able to live and breathe statistics because the core fundamentals are always useful. Some elements of data mining and clustering should also be learnt as needed or as a person’s curiosity demands it.

These days, data visualization done correctly, explains half the analysis by itself. So, some experience in TableauMicrostrategyQlikview is very important in explaining the information clearly.

I also see a lot of visualization available via Google Data Studio and Power BI.

At the end, it is all code.

Whatever the environment of development in an organization, the analyst should have a fair idea about it since all the measurement hooks are mostly encoded. Even the ubiquitous Google Analytics is run based on javascript. A solid grounding in Python, PHP and SQL is also important so we need some intermediate technical courses to get a well-rounded technical perspective.

Understand the data river as it flows downstream

Although, large amounts of data exists, we don’t get training in information architecture.. How do you get unstructured data to structured data, to BI tools and to reports and metrics is something that needs to be taught too. The analyst can use some BI tools and data warehouse development and maintenance skills. As it become more common to build self-service reporting systems, we need to be able to teach some rudiments of this skill to our budding analysts.

Project Management

Most Analysts end up in large project teams as core members in-charge of numbers. So we need to teach them principles of project management and the current techniques like Agile and kanban. This will help them build their managerial skills too.

Design and Analytics

A good analyst will have a strong creative streak, not just have a good head for numbers. We need to be able to look the system that we are trying to improve (or make profitable) from a design perspective too.

In fact, a lot of web analytics is done just to measure and influence the design and flow of the information on the site for the customer. Conversely, not many designers are just going to rely on their intuition while building a site. They would ask the analyst about measuring the success of a particular design. So, a couple of introductory courses on creative design are essential for the education of an analyst.

I hope these make sense dear reader. Please let me know your thoughts.