Event tracking in Google Analytics

By default, Fomo appends up to 3 UTM parameters on your clickable notifications, for easy attribution and reporting inside Google Analytics and the Fomo dashboard.

However, you may experience conflicts with UTM parameters from external traffic sources, such as advertisements, and prefer to remove the internal UTM parameters supplied by Fomo.

To modify or remove your Fomo UTM parameters, simply navigate to Settings > Site while logged into Fomo, modify the fields, and Save:

If you'd like to add alternative tracking methods to engagements with Fomo notifications, follow along below.

Google Analytics Events with Fomo

An excellent alternative to UTM parameters is a GA "event," attached to a click on a Fomo notification.

(Make sure you remove all UTM parameters from your Website > Site > Settings before continuing.)

How it works

  1. Your website visitor clicks a Fomo notification

  2. GA event "fires" and is visible inside your Analytics portal

  3. This event can be attached to a GA Goal

  4. Easily measure Fomo attributable conversions

Attach Fomo to GA Events

Fomo's Javascript SDK has several advanced features. For this tutorial we'll leverage the callback extensions functionality to listen for clicks on Fomo notifications.

Add the following code anywhere in the or

section of your website. If you're using a platform like Shopify, add this inside your theme.liquid section:


You can also dispatch a Google Tag Manager trigger, with something like:

What this does

Let's walk through how the snippet works.

document.addEventListener('FomoLoaded', function(){
  fomo.afterNotificationClick = function(){
  // logic goes here
}
});

This block kicks off our entire operation, with a Fomo feature "afterNotificationClick."

Any valid Javascript placed inside this block will be executed whenever a user clicks a Fomo notification on your website.

Valid Javascript within this listener is fired whenever a Fomo notification on your website is clicked.

Putting it all together

An event is sent to Google Analytics with this single line of code:

ga('send', 'event', 'Fomo', 'Notification Click'); 

As a reminder, here's the syntax for a GA Event:

ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);

Read more on the official Google documentation.

Finally, create a Goal inside Google Analytics, ie "sign up" or "purchase," that incorporates only traffic with this GA Event present.

Going forward, clicks on Fomo notifications will not add UTM Parameters to the destination URL, but you'll still be able to track click-through conversions inside Google Analytics.

Confused? Let us know by emailing hello@fomo.com.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.