Highlighted

Adding CustomTask in Google Analytics Tag

Rookie Contributor

Hi,

We are trying to add an CustomTask in Tealium GA Tag implementation. But as we are using GA Tag for Google Analytics tracking, and 'ga' object is no more accissible (as overwritten by utag), we are not able to add this customtask in our implementation.

 

I have found a similar thread, https://community.tealiumiq.com/t5/Tealium-iQ-Tag-Management/customTask-for-Google-Universal-Analyti...

In the above thread, the possible solution suggested is to modify the GA Template and update the implementation.

 

The impact of above suggested approach has an overall impact on the Existing Analyitcs implementation.

 

Please let us know, how we can add CustomTask in GA Tag.

 

Thanks in Advance.

 

1 REPLY 1
Highlighted

Adding CustomTask in Google Analytics Tag

Tealium Employee

Hi @kasimbohra 

Using a Javascript code extension reference the gtag object. Eg:

gtag('set', 'customTask', function(model) {
  console.log(model.get('hitPayload'));
});

Hope that helps