Track Instagram Referrals to your Shopify site in Google Analytics

You may have noticed traffic from Instagram isn’t showing up (as much as it should) within your Google Analytics reports.

This is because Instagram on the phone doesn’t open profile links natively, instead it passes them to your browser, which opens them directly.

The result being that this traffic appears in GA under ‘direct referrals’ – with no attribution towards Instagram.

Fortunately, there’s a way round this.

Using Google’s URL builder, we can append tracking code to our Shopify’s store URL.

The details you’ll want to put into Google’s URL builder are:

Website URL: Your website
Campaign Source: Instagram
Campaign Medium: Social
Campaign Name: Profile

This results in a URL like the below:

Photo credit: coffeeringsandscribbledthings.com

That’s pretty ugly, right?

So here’s the solution. Shopify has a URL redirect feature somewhat hidden away within its settings.

First go to (what’s recently been named) ‘Online Store’.

Then select ‘Navigation’:

At this point, you’ll see hidden in the top right the option for ‘URL Redirects’ – choose that:

Then comes the fun part. Choose to ‘Add a URL Redirect’:

Then for the URL redirect. You want to add something like ‘/insta’ as the Old Path, and put your full site address with UTM parameters in Redirects to path (example below):

N.B. It’s important here that you include the http:// part, otherwise Shopify will treat it as a relative URL not an absolute one (and thus it won’t work).

Hit Save URL redirect and you can test your url.

For example, with the above, I’d type pressurewashdirect.co.uk/insta into my browser, and hit enter. It should take me to my site’s home page. And if you look in the address bar you’ll see all the extra UTM parameters which feeds details back to Google Analytics.

So that’s it! You can use this new vanity URL in your instagram profile, and fully track your instagram traffic.

Any questions on this, ask me in the comments.

Comments

16 responses to “Track Instagram Referrals to your Shopify site in Google Analytics”

  1. Will Meyers Avatar
    Will Meyers

    is there a way to get accurate goal conversions or ecommerce conversions from utm parameters?

  2. Mary DeArment Avatar
    Mary DeArment

    You say that the “new vanity URL” can be used in instagram profile to track traffic–but there is only one opportunity for a link in the profile and it needs to be the name of my website, not this awful coded long URL. Even with shortening it still isn’t the name of my website

  3. Russell Smith Avatar

    John you should put up some easy ‘share’ buttons on here. I wanna put this out on Twitter, it’s really useful.

    Just tried it for my store and it works spot on. Great stuff! Thanks.

    1. John King Avatar

      Thanks Russ, good idea, I’ll try and find some that aren’t too intrusive.

      Glad to hear the technique worked well :)

      1. Russell Smith Avatar

        I’m a fan of Sassy Social Share (https://wordpress.org/plugins/sassy-social-share/).

        You can choose from about 100 different sites to share to (obv choose 4-6 max), choose whether to put them at the top, bottom and / or side of content and choose how big you want the icons (down to really small), as well as what shape you want the icons to be.

        Pretty smooth IMHO. Cheers John!

        1. John King Avatar

          Thanks Russ! I’ll take a look :)

  4. Lori Huff Avatar
    Lori Huff

    Great post! I noticed when the link in our Instagram profile was opened in Safari (as opposed to Chrome), the extra UTM parameters didn’t show in the address bar. Is that a problem?

    1. John King Avatar

      Yeah, that would be a problem. When you click on the safari address bar and go to edit the URL, do they definitely not appear? (Using an Android phone currently, so its harder to check).

      1. Lori Huff Avatar
        Lori Huff

        Hi John. When I click on the address bar the extra UTM papameters are there. I was expecting it to look like it does in Chrome. Thanks so much for the help! Again, great post!

  5. Rafal Mor Avatar

    You can get more deep Tracking using:
    https://pixelshop.io

    It’s allows you to track on which post the user click and which products he purchase and more anayltics.

  6. Kasey Lords Avatar
    Kasey Lords

    amazing!!!!!!!!!!!

  7. Sarah Avatar
    Sarah

    Would this impact your website SEO if you do this?

    1. John King Avatar

      I don’t know.
      But my assumption is probably not.
      The website link in your Instagram bio is a no follow link.
      So in theory it shouldn’t pass any link juice from the instagram domain.
      And if it did, then changing it from a root domain to a deep link wouldn’t change much, it would still be a link to your domain.

      1. Sarah Avatar
        Sarah

        Thanks John :)

  8. thecaptainsvintage Avatar

    Thank you very much, this solves my problem!

    1. John King Avatar

      Great! Glad it helped, and thanks for letting me know :)

Leave a Reply

Your email address will not be published. Required fields are marked *