How to Track Snapchat Campaigns in Google Analytics

Estimated Reading Time: 5 minutes

Snapchat: the kids love it and brands don’t quite know what to do with it.

As more and more brands begin to test the waters a common issue has arisen: it blows up Google Analytics reporting!
What we tend to see is that page views for landing pages and product pages being used for Snapchat Ads go through the roof and high bounce rates accompanying them. So much so that for many brands it is effecting site-wide reporting numbers.

The issue lies in how pages are displayed, within Snapchat ads, causing impressions to be tracked as full-on pageviews.

When a Snapchat Ad is shown to a user, the landing page on the brand site is pre-loaded in the background in either a mobile Safari (iOS) or mobile Chrome (Android) browser. This is great for the user experience, as soon as the user swipes up on the ad the page is there ready for them.

For Google Analytics tracking, however, this is a nightmare.

Due to the page being pre-loaded in a mobile browser, all of the code on the page is fully loaded at the time of the Ad impression, including the scripts for Google Analytics. When this happens, a pageview (and any event that you may have firing on page load or shortly thereafter) is sent. The result? Inflated pageviews and a super high bounce-rate.

So how do we fix this you ask?

By leveraging a slick browser API and Google Tag Manager of course!

When the page is pre-loaded in the background of the Snapchat ad, the mobile browser is able to tell that the page is not viewable. To leverage this, we’ll use what is called the Page Viewability API for web browsers.

While this may sound complicated, it is actually rather simple. A few quick scripts in Google Tag Manager and a slight Google Analytics tag modification and you’ll be up and running within minutes. Luckily for us, Simo Ahava wrote a great guide for leveraging the Page Viewability API back in 2014.

Basically what this does is uses the Visibility API to tell us if a page is viewable or not. When the page is not viewable, we use an exclusion trigger within GTM to block the Google Analytics tag from firing. Once a user swipes up on the ad, and the page does become viewable for them, the same method will tell us that the page is in view and the exclusion will be removed from the tag.  This results in our Google Analytics tag firing.

Use the above approach to see *true* pageviews within Google Analytics resulting from our Snapchat ads and get an accurate view of the bounce rate for these users.

Special Pro Tip:

For many, it may make sense to begin leveraging the Page Visibility API for all page tracking within Google Analytics. If this is the case, simply apply this methodology to your regular Google Analytics pageview tag and have the added benefit of seeing true pageviews across all instances (for example if a user opens a page in another tab this would also apply)

If you are not ready to make that sort of commitment and want to keep consistency with the current setup BUT are planning to run a number of campaigns in Snapchat Ads, it makes sense to go with a slightly modified approach. For this we will create unique pageview tracking specifically for pages used for our Snapchat Ads.

As a strong user of Google Analytics, you are already following the best practice of using UTM tagging to denote the source/medium of traffic. For the purpose of Snapchat ads you might use something like a ‘Source’ of ‘Paid Social’ and a ‘Medium’ of ‘Snapchat’. Leverage this fact within a conditional trigger for just Snapchat traffic.

Here’s how it will work:

  • Create an exact copy of your current Google Analytics Page View tag
    • Name it “Snapchat Pageview”
  • Create a new custom js variable named “snapchatWebview” in GTM to return ‘true’ if the URL contains the UTM parameters you are using to denote traffic from Snapchat. Here’s a quick example:

  • Create a new trigger for “Snapchat Page View”
    • Use the logic of “snapchatWebview” ‘equals’ “true”

  • Apply the new “Snapchat Page View” trigger as an exclusion for the regular Google Analytics Page View tag and as the firing trigger for the new “Snapchat Page View” tag
  • Apply the necessary modifications to the “Snapchat Page View” tag to only leverage the Page Visibility API in those instances of traffic coming from Snapchat

All done! Good luck with the Snapchat campaign and rest assured that you have complete and accurate tracking within Google Analytics.

Author

  • Lucas Long

    Lucas Long is co-author of the Amazon best-selling book, Crawl, Walk, Run: Becoming a Privacy-Centric Marketing Organization. He is also the Director of Privacy Strategy at InfoTrust, working with global organizations at the intersection of digital strategy, privacy regulations, and technical data collection architecture. Through these efforts, Lucas helps companies understand their limitations for data enablement due to privacy challenges and design optimal ways to accomplish core use cases in a compliant manner.

    When not discussing the intricacies of GDPR and cookie laws with clients, Lucas enjoys traveling and exploring new cultures, one bite at a time. Based in Barcelona, he is also a presenter, featured at industry events organized by Google, the Digital Analytics Association, the American Marketing Association, and the Journal of Applied Marketing Analytics.

Facebook
Twitter
LinkedIn
Email
Originally Published: November 10, 2017

Subscribe To Our Newsletter

September 27, 2023
Originally published on November 10, 2017

Other Articles You Will Enjoy

Google Tag Best Practices for Google Analytics 4

Google Tag Best Practices for Google Analytics 4

After collaborating with several of my colleagues at InfoTrust including Bryan Lamb, Head of Capabilities, Corey Chapman, Senior Tag Management Engineer, Chinonso Emma-Ebere, Tech…

4-minute read
What Is Consent Mode in Google Analytics 4 and How Does It Work? | A Beginner’s Guide

What Is Consent Mode in Google Analytics 4 and How Does It Work? | A Beginner’s Guide

Consent Mode in Google Analytics 4 (GA4) is a helpful tool for website owners to respect user privacy preferences when it comes to tracking…

3-minute read
How Data Maturity Can Cultivate a Data-Driven Culture

How Data Maturity Can Cultivate a Data-Driven Culture

Data-driven decisions are a buzz topic in Martech. It is essential for C-suite executives to understand and more importantly, use their data to move…

4-minute read
Is It Time to Upgrade? 4 Signs Your Organization Needs Google Analytics 4 360

Is It Time to Upgrade? 4 Signs Your Organization Needs Google Analytics 4 360

As VP of Partnerships at InfoTrust, I’ve had the opportunity to talk with hundreds of decision-makers about their interest in upgrading to Google Analytics…

4-minute read
Leveraging Attribution Models in Google Analytics 4 to Improve Your Marketing Strategy: Tips and Best Practices

Leveraging Attribution Models in Google Analytics 4 to Improve Your Marketing Strategy: Tips and Best Practices

In the dynamic landscape of digital marketing, understanding the customer journey is crucial for optimizing strategies and maximizing ROI. Google Analytics 4 (GA4) introduces…

5-minute read
Leveraging Custom Dimensions and Metrics in Google Analytics 4 for Content Performance Measurement: Best Practices and Real-World Examples

Leveraging Custom Dimensions and Metrics in Google Analytics 4 for Content Performance Measurement: Best Practices and Real-World Examples

In today’s digital landscape where content reigns supreme, understanding how your audience interacts with your content is paramount for success. For news and media…

5-minute read
Tracking User Behavior with Events in Google Analytics 4: Examples and Use Cases

Tracking User Behavior with Events in Google Analytics 4: Examples and Use Cases

So you’ve created your Google Analytics 4 (GA4) properties, created your data stream(s), and followed all the necessary steps to configure your property. Now…

5-minute read
Google Analytics 4 Implementation Checklist: Ensure You’re Tracking Everything You Need

Google Analytics 4 Implementation Checklist: Ensure You’re Tracking Everything You Need

In the dynamic landscape of digital marketing, data is supreme. Understanding user behavior, preferences, and interactions on your website is crucial for making informed…

4-minute read
Predictive Analytics in Google Analytics 4: How to Use Machine Learning to Forecast User Behavior and Outcomes

Predictive Analytics in Google Analytics 4: How to Use Machine Learning to Forecast User Behavior and Outcomes

Google Analytics 4 (GA4) is embracing the power of machine learning by incorporating predictive analytics within the platform so that you can use your…

7-minute read

Get Your Assessment

Thank you! We will be in touch with your results soon.
{{ field.placeholder }}
{{ option.name }}

Talk To Us

Talk To Us

Receive Book Updates

Fill out this form to receive email announcements about Crawl, Walk, Run: Advancing Analytics Maturity with Google Marketing Platform. This includes pre-sale dates, official publishing dates, and more.

Search InfoTrust

Leave Us A Review

Leave a review and let us know how we’re doing. Only actual clients, please.