Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

MeasureCamp Recap: Making Your Life Easier With Custom Templates In Google Tag Manager

I was fortunate to be able to represent Wpromote at the first-ever MeasureCamp in the State of Texas (and only the third location in the United States!), MeasureCamp Austin. MeasureCamp is the world’s largest Digital Analytics ‘unconference’, meaning it is run by members of the Digital Analytics Community for the Digital Analytics Community. You can find out more about MeasureCamp by visiting the official website.

One of the most unique things about MeasureCamp is that there is no pre-arranged agenda and anyone in attendance can, and is encouraged to, lead a session on a topic of their choosing. Although I had never given any presentation of this type before, I was super excited about the opportunity and decided to prepare a session on a topic that I have been passionate about over the past few months — Custom Templates in Google Tag Manager.

What Are Custom Templates In Google Tag Manager?

Introduced in the Summer of 2019, Custom Templates are a means of creating safe, reusable, and portable Custom HTML/JavaScript elements in Google Tag Manager (GTM). Google has also opened Custom Templates up to the GTM community in the form of the Community Template Gallery, where Custom Templates can be shared. The GTM Community Template Gallery can be found here.

Why Do They Matter?

Before Custom Templates, it was very common for me to have to write the same Custom JavaScript functions over and over to be able to do routine things. Things like returning the total price of a purchase made on a Shopify ecommerce website are both highly useful (for things like dynamic conversion values in Google Ads) and highly common. Below is a screenshot of the Shopify data object where all transaction data is recorded when a purchase is completed.

Since the Shopify data object is not natively available to GTM, or your tags, I would end up writing something like the following to return the total price of a purchase for use in Google Ads Conversion tags.

There Had To Be A Better Way!

Using Custom Templates in GTM, I created a variable template that will return almost any of the data points available in the Shopify data object using a simple dropdown menu.

NO CODING NECESSARY.

Pretty Cool, Right?!

I think we can all agree that this kind of write once, use anywhere solution for GTM is pretty cool, but the real power comes when you combine Custom Templates. For example, you could combine the above custom template with another, and use it to build ecommerce dataLayers on any Shopify site, with no coding necessary. The example below uses the dataLayer Builder + Standard Ecommerce Custom Template, and populates with values pulled from the Shopify Custom Template above.

So, Now What?

I hope this has given you some idea of the utility of Custom Templates in GTM. If you use GTM at all I would highly encourage you to check out the Community Template Gallery to see what’s already out there.

If you don’t find what you’re looking for I would encourage you to build it and submit it to the Gallery, because if it’s useful to you it will likely be useful for others as well.

If you have an idea for a Custom Template but don’t know where to start, please reach out as we would love to collaborate.

Parting Thoughts

MeasureCamp Austin was an incredible experience for me. Not only was I able to lead a session about a topic that I feel strongly about, but I also got the chance to participate in many meaningful and timely discussions related to the current state of Digital Analytics. I cannot speak highly enough of my experience at MeasureCamp and would encourage all who are able to attend one to do so.

For anyone interested in learning more from my presentation at MeasureCamp, the slides can be found here.

The post MeasureCamp Recap: Making Your Life Easier With Custom Templates In Google Tag Manager appeared first on Wpromote Blog.



This post first appeared on Digital Marketing Blog | Industry Insights. All Day. All Night. | Wpromote, please read the originial post: here

Share the post

MeasureCamp Recap: Making Your Life Easier With Custom Templates In Google Tag Manager

×

Subscribe to Digital Marketing Blog | Industry Insights. All Day. All Night. | Wpromote

Get updates delivered right to your inbox!

Thank you for your subscription

×