Data integration
How to's

Contents

Got insights from this post? Give it a boost by sharing with others!

How to store GCLIDs into a custom dimension in Google Analytics

GCLID’s by default are not available in Google Analytics. We had many clients wanting to store GCLID‘s into a custom dimensions in Google Analytics. There are multiple ways of doing this but the easiest way is using Google Tag Manager. Check out our how to and learn how to do it in 5 minutes.

 

Using Google Tag Manager:

 

If you are on Shopify you are forced to another approach. Simply follow up the custom dimension in Google Analytics. After doing so, head to your Online Store settings and update your Google Analytics setting to the following:

shopify gclid upload to ga

 

Here is the code from the screenshot above:

var gclid = window.location.search;
var gclid = gclid.match("gclid=(.*).")[1];
ga('set', 'dimension9', gclid);

It’s important of course to change the ID of the dimension to your ID. In this case the ID is 9.

 

You might also like to read:

How to Connect Google Analytics to Microsoft Power BI 

How Do You Tag Facebook Ads For Google Analytics?

How to connect Google Analytics to your CRM system?

Tired of juggling fragmented data? Get started with Windsor.ai today to create a single source of truth

Let us help you streamline data integration and marketing attribution, so you can focus on what matters—growth strategy.
g logo
fb logo
big query data
youtube logo
power logo
looker logo