๐Ÿ“™Tracking Custom Sphere Events with GTM

Configure Google Tag Manager to get richer data from your spheres.

In order to capture interaction data from our 3D object canvas in a clear and understandable way within your GTM analytics there is a need to setup custom Sphere events. The following guide will walk you through the configuration required.

Creating Variables

You will need to create three new variables to track and properly display the parameters from your custom events.

  • Open your Admin Workspace and in the left hand menu select Variables

  • Scroll down to the block labelled 'User Defined Variables' and click the New button to add

  • Select Data Layer Variable as the type and use the pen icon to edit the variable configuration

  • Add the Data Layer Variable name in the space provided. You will need to create Three individual Variables. These must be called:

    • eventAction

    • eventName

    • eventCategory

Variable naming must be exactly as shown above.

  • When saving each variable name you can use the same name but just add a space between the words. Example: Variable eventAction saved as Event Action

Once you have created and saved your variables you need to create a trigger for the event.

Creating an Event Trigger in GTM

The trigger will let GTM know when the new event should fire.

  • Open your GTM Workspace and select Tags in the left menu

  • Select New in the top right corner

In the pop up which appears select your existing GA4 Configuration tag and enter the following details:

  • Event Name: sphere_event

  • Add Event Paramaters: eventAction , eventName , eventCategory

  • The Event Parameter area is free text input, not a selector so be sure to check format and spelling. Your table should look like the below image once complete.

Adding and attaching Triggers to Tags

  • Open your GTM Workspace and select Triggers in the left menu

  • Select New in the top right corner

  • Select Custom Event as the new trigger type.

  • The Event name must be: sphere_event

If everything has been configured correctly, your Tag Configuration will look like the below screenshot:

The final step is to Submit these changes

Google Analytics Configuration

All custom parameters must be added as Custom Definitions in GA4 if you want to see/use them in places like Funnel reports, Exploration, see their reporting cards in standard reports, etc.

GA4 takes up to 24 hours to process the data and configurations, so the changes you have made will not appear immediately in reports.

To set this up, open you Analytics dashboard, go to Admin and select Custom Definitions

Click on the Create Custom Definitions option and then enter the following:

  • Name of the parameter: GA4 will display this in your reports

  • Scope: As we are applying this parameter to only one event and not all user events we need to select the scope as Event

  • Event parameter: This my match exactly the name used in your GTM tag. ( eventAction, eventName,eventCategory)

  • You will need to create a new dimension for each parameter, so in total you will create 3.

Configure and Create Custom Events in Google Analytics

GA4 has a feature called โ€œCreate eventโ€. It allows you to create events based on other events already tracked by GA4. For example, if you track page_view events and you want to create a separate event just for the โ€œThank youโ€ page, you can use this feature to create a thankyou_page_visit event.

  • Go to your Admin page, click Create Event, then click Create

  • Enter the name for your custom event, for consistency we suggest calling this sphere_event

  • Keep the checkbox 'Copy parameters from the source event' enabled.

After successful configuration the data will be available in Google Analytics 4 panel. Keep in mind that Google is constantly updating Google Analytics 4. So if something looks different, donโ€™t worry. Keep browsing the interface, and you will eventually find what you need.

If you canโ€™t see the Sphere Action, Sphere Event Category, Sphere Event Name (or whatever custom parameters you are looking for), you must register the custom reports in All Events > Manage Custom Definitions. Then wait up to 24 hours until the data appears in the reports.

It's important to know that Google has certain limitations on custom events, these are:

  • You can send up to 25 event parameters together with the event. Based on various experiments, automatically collected parameters (like page_location, etc.) are counted in this limit.

  • The maximum length of the parameter name is 40 characters.

  • The maximum length of the value (of a parameter) is 100 characters.

For a full list of limitations, please visit Google's support page.

Please feel free to get in touch with Cozmos Support if you encounter any issues when setting up Custom events for your spheres.

Last updated