Support Home > Campaign Management > Google Integration > Google Tag Manager Integration

Google Tag Manager Integration

The Kochava platform provides extensive tools to measure connected devices, including devices integrated with Google Tag Manager. Google Tag Manager is a tool that enables the easy addition or management of a website or app’s tags and code snippets. Without editing the site’s code, AdWords, Google Analytics, Firebase Analytics, Floodlight and other 3rd party tags can be added through the Tag Manager user interface.

The integration with Google Tag Manager allows your mobile app’s event data to be sent to Kochava which can be used for attribution, and displayed within our analytics system.

 

Minimum Requirements:

  • App GUID (obtained from Kochava)
  • App with Firebase SDK

Google Tag Manager Setup

Due to the sequence of events on Android, the built-in first_open event is not currently available to Google Tag Manager. To obtain an indication of first open today, you must include some code in the app to set a variable in local storage upon the app starting, and conditionally log a custom first open event if it’s not already set. The Function Call tag allows you to initiate a pre-registered function implemented in the app, but will not enable you to get a first open event without having some code implemented in the app to do so. It may be a good idea to call that code via a Function Call tag, however, to ensure that GTM has already loaded before attempting to log a custom first open event.

 

  1. Create a User defined variable of type “Function call” that returns whether first open has ever triggered and stores when it has fired.
  2. Create a trigger for first open based on “Container Loaded” with an additional condition that checks the custom variable.
  3. Log in to Google Tag Manager.
  4. Create a Container.
  5. Enter a Container Name.
  6. Select Where to Use Container:
  7. a. iOS
    b. Android

  8. Select the SDK Version:
  9. a. Firebase (iOS)
    b. Firebase (Android)

  10. Click Create.

 


Create a Kochava Install Tag

  1. Click Add a new tag.
  2.  

     

  3. Select Kochava Event Tracking.
  4.  

     

  5. Click Tag Configuration.
  6.  

     

  7. Select the Action Type>Install
  8. Enter the Kochava Application ID. (App GUID from Kochava)
  9. Check to Set App Version. (Optional)
  10.  

    NOTE: By checking this option, the app version value will be set by the valued entered within the Google Tag Manager UI.

     

  11. Check to Set Device Version. (optional)
  12.  

    NOTE: By checking this option, the device version value will be set by the valued entered within the Google Tag Manager UI.

     

    A. Enter App GUID
    B. Check ONLY if the app version explicitly needs to be set.
    C. Check ONLY if the device version explicitly needs to be set.

     

  13. Click Triggering
  14.  

     

  15. Select First Open
  16.  

    NOTE: If the First Open trigger is not present, proceed to Adding a First Open Trigger section.

     

    A. Click “+” to add First Open trigger.

     

    Adding a First Open Trigger:

    1. Click +.
    2. Click Trigger Configuration.
    3. Click First Open.
    4.  

       

    5. Select All First Opens.
    6. Enter a unique Trigger Name.
    7. Click Save.
    8.  

     

  17. Enter a unique Tag Name.
  18. Click Save.

 


Create a Kochava Event Tag

  1. Click Add a new tag.
  2.  

     

  3. Select Kochava Event Tracking.
  4.  

     

  5. Click Tag Configuration.
  6.  

     

  7. Select the Action Type>Event.
  8. Enter the Kochava Application ID. (App GUID from Kochava)
  9. Enter an Event Name, or Select the Building Block>+ for more options.
  10.  

    NOTE: Each post-install event needs to have an individual GTM tag.

     

    BEST PRACTICES: To ensure the highest level of accuracy when passing post-install events to Kochava, it is recommended that events follow a specific naming convention. For more information on Post-Install Events, refer to our Post-Install Event Examples support documentation.

     

    A. Enter App GUID
    B. Enter an Event Name, or Click building block for options.
    C. Additional Events may be added by Clicking on “+”.

     

  11. Check to Set App Version. (optional)
  12.  

    NOTE: By checking this option, the app version value will be set by the valued entered within the Google Tag Manager UI.

     

  13. Check to Set Device Version. (optional)
  14.  

    NOTE: By checking this option, the device version value will be set by the valued entered within the Google Tag Manager UI.

     

  15. If no Custom Parameters need to be added, proceed to configuring a Trigger. If Custom Parameters need to be added continue to Add Custom Parameters section.
  16.  

    Add Custom Parameters:

    1. Click Add Event Data.
    2. Enter a Key.
    3. Enter a Value.
    4. If additional Custom Parameters need to be added, repeat the steps above. If no further Custom Parameters need to be added, Click Continue.
    5.  

      A. Enter Custom Parameters

     

  17. Click Triggering.
  18.  

     

  19. Select a Trigger, or Click + to locate additional Triggers.
  20. Select the Trigger fires on settings.
  21. Enter a unique Tag Name.
  22. Click Save.
  23.  

 
 

Last Modified: Oct 9, 2017 at 1:41 pm