fastory

Statistics

How to track user behavior?

Learn how to use Fastory's Tag Manager to track visits, participations, opt-ins and button clicks in your experiences with Google Analytics 4, Meta pixel and other tracking tags.

You've just published an experience and you want to measure its performance and understand how your users behave? With Fastory's Tag Manager, you send this information straight to your analytics tools.

What is it for?

The Tag Manager lets you trigger tracking scripts at specific moments of your experience, without modifying the experience itself. You paste a script once, choose when it fires, and Fastory takes care of the rest.

It works with Google Analytics 4, Google Tag Manager, the Meta pixel, most CRM pixels and any standard tracking tag. It's the ideal tool to track visits, participations, opt-ins and button clicks.

Access the Tag Manager

  1. Open your workspace.
  1. Go to the Tag Manager section.
  1. Click Create to add a new script.

For each script, you choose the event that triggers it, the experience it applies to and the consent category it belongs to: Essentials, Audience measurement or Personalization. The article "GDPR, customize the cookie consent notification" covers these categories in detail.

Track visits with Google Analytics 4

Google stopped collecting data through Universal Analytics (UA) in 2023. Use a Google Analytics 4 property instead, which relies on a Measurement ID in the G-XXXXXXXXXX format.

1. Get your Google Analytics 4 tag

In Google Analytics, open Admin, then Data Streams, and select your web stream. Copy your Measurement ID along with the base tag (Google tag):

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-XXXXXXXXXX');
</script>

2. Add the initialization script in the Tag Manager

In the Tag Manager, create a script that fires when the experience loads, select the right experience and choose the Audience measurement category. Paste the tag above, replacing G-XXXXXXXXXX with your own Measurement ID, then confirm.

The base tag already records a first page view automatically.

3. Track each screen as an event

To track the different screens of your experience, create a script triggered on the screen view event and send a Google Analytics 4 event:

<script>gtag('event', 'screen_view', { screen_name: 'my_screen' });</script>

Once your scripts are in place, remember to republish your experience.

Track opt-ins collected in the bot

Choose the When an opt-in question is answered event and select the relevant bot. You can add the optinvalue variable to capture the answer, then send an event to Google Analytics 4:

<script>
  gtag('event', 'optin', {
    event_category: 'Bot',
    event_label: 'Optin <<< VARIABLE OPTINVALUE >>>'
  });
</script>

Track the events you need

The Tag Manager offers a complete list of events on which you can trigger Google Analytics 4 events, a Meta pixel, a CRM pixel and more, including:

  • when the game starts;
  • when the bot closes;
  • when the visitor enters a contest;
  • when the visitor clicks a button.

And many more.

Track your CTAs

A simple way to track buttons is to add UTM parameters to the links that redirect to your website or social media. You can build these links with Google's Campaign URL Builder.

Check that your scripts are working

Use the DebugView of your Google Analytics 4 property, or the Google Tag Assistant, to check in real time that your events are being received.

  1. Open your experience in a private browsing window.
  1. Go through the screens.
  1. Watch the events appear in DebugView or Tag Assistant.

Best practices

  • Always assign the right consent category so your tracking respects your visitors' choices.
  • Use a clear event name for each action to keep your reports readable.
  • Republish your experience after adding or editing a script.

FAQ

Does Fastory still work with Universal Analytics?

No. Google shut down Universal Analytics in 2023. Create a Google Analytics 4 property and use its Measurement ID in the G-XXXXXXXXXX format. Old UA-XXXXXXXX-X scripts no longer collect any data.

How do I connect Google Analytics 4 to a Fastory experience?

Copy the Google Analytics 4 base tag from Admin, Data Streams, add it in Fastory's Tag Manager as an initialization script on your experience, choose the Audience measurement category, then republish. Your experience starts sending its data to Google Analytics 4.

Which events can I track with Fastory's Tag Manager?

You can trigger scripts on events such as the game starting, the bot closing, contest participation, button clicks and opt-in answers in the bot. Each script can send data to Google Analytics 4, a Meta pixel, a CRM pixel or any standard tag.

How do I check that my tracking works?

Use Google Analytics 4's DebugView or the Google Tag Assistant. Open your experience in a private browsing window, go through it, and check that your events are received in real time.

Can I track button clicks and CTAs?

Yes. Add UTM parameters to your button links to track the traffic they generate, and trigger a Tag Manager script on the click event to record it in your analytics tool.

Did this answer your question?
😞
😐
🤩