Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    As far as I can see, tracking the dataLayer.push() methods is automatic, there is no need to update those codes. There is one point where you may miss data: the initial data layer push() before the GTM container code does not have an event name as GTM implicitly assigns this to the gtm.js (=Container loaded) event.

    Reading the Zaraz docs, it says:
    To start using zaraz.ecommerce(), you first need to enable it in your Zaraz account and on the tool you plan to send ecommerce data to. Then, add zaraz.ecommerce() to the <body> element of your website.

    I think Jeffylube is asking about the last part “add zaraz.ecommerce() to the <body> element of your website.”

    I believe your plugin would be best fit to handle such a thing, allowing the users of your plugin to easily benefit from CloudFlare Zaraz.

    Thread Starter jeffylube

    (@jeffylube)

    Yes – it seems Zaraz has been updated since my last post.

    https://developers.cloudflare.com/zaraz/web-api/ecommerce/

    @duracelltomi – Would be awesome if this plugin could add the additional tracking codes:
    zaraz.ecommerce(‘Event Name’, { parameters });
    Is this a possibility?

    E-commerce tracking is also compatible with Google Analytics 3 (Universal Analytics), Google Analytics 4, Bing and Facebook Pixel.

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Are you sure there is no way to fire this tracking code from inside a GTM container using a custom HTML tag?

    If you have imported the GA4 container template from gtm4wp.com then you will have an {{Ecommerce}} variable to be used elsewhere like in this case.

    If you create a custom HTML tag and fire it on DOM Ready or Window loaded with this could, wouldn’t it work?

    <script>
      zaraz.ecommerce( {{Event}}, {{Ecommerce}} );
    </script>

    If someone could test this and it would work, I could also create a tag template inside GTM that everyone could use without the need to use custom HTML tags.

    Thread Starter jeffylube

    (@jeffylube)

    @duracelltomi – I think the reason for Zaraz is to replace GTM. Cloudflare will automatically load the script from their end, but the site still needs to dynamically generate script/tag.

    I guess this would mean there is no need to trigger GTM at all, maybe should be a new plugin all together since no more need for GTM? But functionality already partially exists in your existing one so I guess why make a new one.

    Just some thoughts here…

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Oh, I see. Sorry, actually I was not aware of what Zaraz actually is and how it works. But now I did the homework and read the docs carefully ??

    It is interesting that the dataLayer compatibility mode does not offer ecommerce data mapping if this is simply a line of code as mentioned here earlier.

    There are some higher priority tasks to complete in the backlog, I am not sure this change could be added quickly but I am also not yet completely sure if this is something GTM4WP should implement.

    A separate plugin would be better IMHO as there could be feature additions in Zaraz in the future that could move away from such simple differences and that would make GTM4WP even more complex. A separate plugin – event based on GTM4WP – could easily adapt to Zaraz’s development.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cloudflare Zaraz’ is closed to new replies.