Using Google Tag Manager to Track Visitor Interactions

Using Google Tag Manager to Track Visitor Interactions

August 23, 2020 2:00 pm

On-line retailers want knowledge to drive selections. An instance is monitoring customer exercise. On this submit, I’ll evaluation the way to arrange the reporting of widespread website interactions utilizing Google Tag Supervisor.

To make certain, a developer can add JavaScript to a website to help numerous reporting in Google Analytics. For instance, to trace clicks on a button, JavaScript can hearth an onClick occasion handler in Google Analytics.

Nevertheless, Google Tag Supervisor can monitor clicks, too, with out deploying JavaScript. (For a primer, see “Getting Began with Google Tag Supervisor, for Ecommerce.”)

For instance, the screenshot under is from my firm’s website. I need to know what number of clicks the “View Pricing” button receives.

How many clicks did the “View Pricing” button receive?

What number of clicks did the “View Pricing” button obtain?

I can monitor clicks in Google Tag Supervisor, beginning at Triggers > New.

Track clicks in Google Tag Manager, starting at Triggers > New.

Monitor clicks in Google Tag Supervisor, beginning at Triggers > New. Click on picture to enlarge.

Subsequent, I’ll identify the set off on the prime left, changing “Untitled Set off” with “View Pricing Clicks.”

I’ll then choose Set off Sort > Clicks – Simply Hyperlinks > Some Hyperlink Clicks. I’ll depart the 2 packing containers unchecked, and I’ll set “Click on Textual content” = “matches RegEx (ignore case)” = “View Pricing.”

Select Trigger Type > Clicks – Just Links > Some Link Clicks. Set “Click Text” = “matches RegEx (ignore case)” = “View Pricing.”

Choose Set off Sort > Clicks – Simply Hyperlinks > Some Hyperlink Clicks. Set “Click on Textual content” = “matches RegEx (ignore case)” = “View Pricing.” Click on picture to enlarge.

Word that I chosen “matches RegEx (ignore case)” as a result of it’s probably the most versatile strategy to search for the textual content and capitalization of “View Pricing.” For instance, the frontend of the location reads “VIEW PRICING” as a result of CSS. The textual content within the HTML is “View Pricing.”

Subsequent, I’ll save the set off.

Making a Tag

I’ll now create the brand new tag in Google Tag Supervisor at Tags > New.

Create the new tag in Google Tag Manager at Tags > New.

Create the brand new tag in Google Tag Supervisor at Tags > New. Click on picture to enlarge.

I’ll identify the tag on the prime left, changing “Untitled Tag” with “View Pricing Clicks.”

I’ll then choose “Google Analytics: Common Analytics” because the Tag Sort and “Occasion” because the Monitor Sort. I’ll populate the Occasion Monitoring Parameters of “Class,” “Motion,” and “Label.” I’ll depart the “Non-Interplay Hit” as “False” and choose my Google Analytics Settings variable (or configure if prompted).

Select “Google Analytics: Universal Analytics” as the Tag Type and "Event" as the Track Type. Populate the Event Tracking Parameters of "Category," "Action," and "Label."

Choose “Google Analytics: Common Analytics” because the Tag Sort and “Occasion” because the Monitor Sort. Populate the Occasion Monitoring Parameters of “Class,” “Motion,” and “Label.” Click on picture to enlarge.

Subsequent, I’ll add the set off I simply created to fireside the tag.

Add the trigger to fire the tag.

Add the set off to fireside the tag.

I’m now prepared to save lots of the tag and publish it to Google Tag Supervisor by clicking on “Submit” within the prime-proper of the web page.

Save the tag by clicking on “Submit” in the top-right of the page.

Save and publish the tag by clicking on “Submit” within the prime-proper of the web page.

Confirm the Occasion

It’s essential to verify that the brand new occasion is reporting appropriately in Google Analytics. To do that, I’ll go to Google Analytics and use Realtime reporting at Realtime > Occasions. To check, I’ll click on “View Pricing” on my website and ensure the press in Realtime.

To confirm the new event, go to Google Analytics and use Realtime reporting at Realtime > Events.

To verify the brand new occasion, go to Google Analytics, and use Realtime reporting at Realtime > Occasions. Click on picture to enlarge.

I’ll additionally click on on the Occasion Class (“Button”) worth to make sure the Occasion Label of “View Pricing” is correctly reporting.

Click on the Event Category ("Button") value to ensure the Event Label of "View Pricing" is properly reporting.

Click on on the Occasion Class (“Button”) worth to make sure the Occasion Label of “View Pricing” is correctly reporting.

Monitoring Clicks on Telephone Numbers

A standard aspect on a website is a clickable telephone quantity for cellular customers.

To arrange monitoring of telephone quantity clicks, begin by making a set off in Google Tag Supervisor just like monitoring button clicks, above. The exception is to set the “Click on URL” = “accommodates” = “tel”.

To track phone number clicks, create a trigger in Google Tag Manager similar to track button clicks, above. The exception is to set the “Click URL” = “contains” = “tel”.

To trace telephone quantity clicks, create a set off in Google Tag Supervisor just like monitoring button clicks, above. The exception is to set the “Click on URL” = “incorporates” = “tel”. Click on picture to enlarge.

Then create a tag (just like the one to trace button clicks). Set the Occasion Class and Occasion Label values and depart the Occasion Label clean.

Set the Event Category and Event Label values and leave the Event Label blank.

Set the Occasion Class and Occasion Label values and depart the Occasion Label clean.

Subsequent, I’ll confirm, in Realtime reporting, that the press occasion is firing in Google Analytics.

Verify, in Realtime reporting, that the click event is firing in Google Analytics.

Confirm, in Realtime reporting, that the press occasion is firing in Google Analytics. Click on picture to enlarge.

Extra Monitoring

I’ve defined within the submit tips on how to monitor clicks to a “View Pricing” button and a phone quantity. There are various extra prospects for ecommerce websites, nevertheless. Examples embrace:

  • Error messag

You may also like...