Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Unable to send GA4 data with adobeDataLayer using GTAG extension

pk111111
Level 1
Level 1

Hello!

 

I am having difficulty sending data to GA4 using the adobeDataLayer and Acronym's GTAG extension. My rule is successfully fired after the adobeDataLayer.push but an error is causing the GTAG extension to fail.  For example, here is the add_to_cart push.

 

adobeDataLayer.push({
            'event': 'add_to_cart',
            'ecommerce': {
              'items': [{
                'item_name': 'Donut Friday Scented T-Shirt', // Name or ID is required.
                'item_id': '67890',
                'price': '33.75',
                'item_brand': 'Google',
                'item_category': 'Apparel',
                'item_category2': 'Mens',
                'item_category3': 'Shirts',
                'item_category4': 'Tshirts',
                'item_variant': 'Black',
                'item_list_name': 'Search Results',
                'item_list_id': 'SR123',
                'index': 1,
                'quantity': '2'
              }]
            }
          });​

 

The extension is configured to use ACDL as the dataLayer name.

pk111111_0-1636829255152.png

 

The add to cart rule successfully fires but an error is preventing data from being sent to GA4. 

pk111111_1-1636829419779.pngAny ideas how to resolve this issue?

Thanks!

 

2 Replies
yuhuisg
Community Advisor
Community Advisor

It is possible that the adobeDataLayer's internal specification is incompatible with what gtag expects, even though they appear similar.

Mrgupta
Level 1
Level 1

Instead of using extension, can you try triggering GA analytics using custom code.