Zaraz track and ecommerce - HOW TO for advanced implementation

ZARAZ DOCUMENTATION

There is a lack of information on how to configure zaraz and how it interact with third party tracking API

I am opening this topic because I see a lack of information regarding zaraz and the implementation methods with third-party tools that does not help development.
Let’s try to take stock of the situation, correct me and add what is missing:

Zaraz web api supports 2 modes:

track / ecommerce

The track mode sends custom events that must then be managed via triggers to pass the correct values ​​to third-party providers (e.g. analytics or ads).

The ecommerce mode is specific for some events related to the world of ecommerce, and from what I can gather I believe this means that all the events of the ecommerce mode already have an automatic mapping at the system level with the third-party provider apis (I say should because this is not specified anywhere clearly in the documentation).

At this point many questions arise:

Using ecommerce events, as for example order completed, is it still necessary to create triggers and actions to send the conversion labels to google adwords? It would seem so, otherwise I don’t see how it is possible for Google Ads to receive the correct conversion label!

So what is already mapped between zaraz.ecommerce and third-party providers? Which events are already sent and with which data?

I find that there is a really important lack of documentation around zaraz, everything is left to presumptions and speculations, there is nothing clear and definitive in the documentation!

For example, how do I manage a retargeting? zaraz allows me to choose 3 types of custom actions for Google Ads (page view, retargeting and conversion), at this point what is the difference between ecommerce and track?!

Ill add information and question in the time i get it into my hand:

Google ADS conversion id and label, how to handle in the right way?

This is a good question, i would know if there is some data structure to pass conversion label and conversion id directly to zaraz data layer

OR

If we need to manually create conversion action in cloudflare dashboard triggered by specific event.

In the second case it will a nightmare to deploy solution usable directly for customer (for example an ecommerce module)… i’ve not found any documentation on the right way (if possible) to pass conversion label directly to zaraz.

Something like this can be done? if yes where is documented? If no … why?

zaraz.ecommerce(‘purchase’, {
conversion_id: ‘1234567890’, → THIS IS JUST SETUP IN CLOUDFLARE DASHBOARD and can be skipped.
conversion_label: ‘xx8CM-xxxxxxxxxXX’, // Your Conversion Label
value: 100.00, // Optional: The monetary value of the conversion
currency: ‘USD’ // Optional: Currency code
});

Order Completed event are not registered in GA4

GA4 not stat any single Order Completed event, but zaraz monitor consolle record at least one in the last 30 minutes

Google ADS say “INACTIVE” for the same conversion_label

Here the event sent to zaraz.ecommerce

Here the debug report from zaraz.debug for GA4 and ADS

Conclusion

Seem many problem here:

  1. Event is passed to zaraz
  2. Event is sign as sent in zaraz debug both for GA4 and ADS
  3. Event is recorded in cloudflare dashboard
  4. Event is not shown in GA4 or ADS consolle

@yoav_zaraz any help will be appreciate.

Not even a whisper from cloudflare. No wonder there are no integrations for zaraz for virtually any platform. The documentation has incredible gaps and there is dead silence from cloudflare. I really don’t know what to say ^^

I face the same issue following FAQ · Cloudflare Zaraz docs but I still cannot see goals convertions show up in Google Ads panel when the zaraz debbuger and monitor shows the actions are fired with the right conversion ID without AW- prefix and the right conversion label.

I’ve been able to see a conversion event in Google Ads using the Zaraz Google Ads tool.

  1. You have to remove the “AW-” from the conversion ID in the Google Ads Tool settings in Zaraz. see FAQ · Cloudflare Zaraz docs

  2. Make sure the conversion label is right. see FAQ · Cloudflare Zaraz docs

  3. Check with Zaraz debugger that your customs actions are triggered and sent to Google Ads.

  4. I advise you also check with Google Chrome Inspect Network Tab that HTTP requests to googleadservices.com are sent, well formatted and end up with response 200 OK.
    I see yours contains AW- in the url that should be withouut AW- as said in 1.

  5. With all that I was expecting to see events being counted in Google Ads Goals panel but I was wrong. To see the count go up in Google Ads you have to run a Google Ads Campaign find your ad on google and clic on it like you were a customer and do the conversion action. Wait for hours or one day to see the conversion goal counter go up on Google Ads. Just dont expect to see a conversion goal counter go up if you only go to your site and do the conversion event. You must find your ad like a real customer and clic on it or wait for customers to do it for you.

That worked for me, i’m sure it will work for you ! Good luck

Hi, thanks for your reply, i will answer inline

I was over this BUT i’ve found other topic with cloudflare employee answer that say to use the complete ID format. As for this faq information are not very clear, but i will give a try removing the AW- part from the conversion id, thanks

Conversion label is right, i’ve copy pasted from the ads consolle for every event and insert in my script logic.

Here another good point that completely miss from zaraz documentation. There is’nt a single page talking about WHAT kind of event is automaticaly passed to third parts service and wich one require to biuld trigger and action. Google analytics 4 seem to receive all the correct event type (track and ecommerce) without the need of a single custom trigger or action.

How its possible there is this complete lack on information here? Whats the purpose of the ecommerce api if we cant know what cloudflare automatically pass to third pars service and what not? This is a nightmare for me.

Actually i ended up creating a custom trigger for every conversion event.
In the script i pass to these events a filed named conversion_label that i’ve mapped to zaraz conversion label field.

Product add trigger example

Trigger

Action

AFter removing the AW- i can see this call in the network tab:

Example of googleadservices.com call

https://www.googleadservices.com/pagead/conversion/16835476181/?guid=ON&rnd=1738415441360&fst=1738414442417&cv=9&sendb=1&num=1&u_java=false&url=https%3A%2F%2Fwww.speedmypresta.com%2Fps17%2Fordine&tiba=speedmypresta.com%40ps17811&u_tz=60&u_his=10&u_h=914&u_w=412&u_ah=914&u_aw=412&ig=1&ref=https%3A%2F%2Fwww.speedmypresta.com%2Fps17%2Fcarrello%3Faction%3Dshow&event=Checkout+Started&currency=eur&value=230.29&checkoutStep=2&gaAccount=G-PRE1SF0LK9&products=[object+Object]%2C[object+Object]&label=&gcd=11p1p1p1p5

Status 302

https://googleads.g.doubleclick.net/pagead/viewthroughconversion/16835476181/?guid=ON&rnd=1738415441360&fst=1738414442417&cv=9&sendb=1&num=1&u_java=false&url=https%3A%2F%2Fwww.speedmypresta.com%2Fps17%2Fordine&tiba=speedmypresta.com%40ps17811&u_tz=60&u_his=10&u_h=914&u_w=412&u_ah=914&u_aw=412&ig=1&ref=https%3A%2F%2Fwww.speedmypresta.com%2Fps17%2Fcarrello%3Faction%3Dshow&event=Checkout+Started&currency=eur&value=230.29&checkoutStep=2&gaAccount=G-PRE1SF0LK9&products=[object+Object]%2C[object+Object]&label=&gcd=11p1p1p1p5

Status 200

Complete network call list made to google

googleadservices.com

googleads.g.doubleclick.net

google.com

As you can see we have 5 call 3 302 redirect.

Payload event for purchase event:

Regarding this i know this bheavior, conversion are only counted when you buy after a campaign click or view, BUT i’m pretty sure the status of conversion label must not be “INACTIVE” if conversion event are correclty received from ads BUT not counted as a valid conversion.

Now if you where right on point 1 the reason here is that i need to remove the AW and check if this status “INACTIVE” goes away, in your configuration , before try the conversion with a real campaing , which was the status of the conversion event in ads consolle? Inactive?

Recap of major problem / questions

For me the major throuble is that i’m not able to find any evidence in documentation on what and how zaraz pass automatically to third parts tools and what need manual implementation.
Do you have any update on this?

Conclusion

I will share update after the conversion id AW- removal.

Can you share your conversion stack call to goole service from network tab and trigger / action configuration ?

While Zaraz seems amazing on paper, we gave up on it a few years ago. Indeed, lack of documentation and/or settings. Try using it with GTM… is says it can use the already set up datalayer info, but we never got it working porperly. Settings seems missing or no clue how to use the existing ones properly. Wondering for years why they don’t have working (and tested) examples online for the hard stuff like GTM.
If I remember correctly Zaraz also started causing errors on the site, maybe VUE related.

Hi, thanks for your share, here i’m developing a custom integration without reeling on GTM, because if i would stay with GTM i can use server side script feature to offload client call. BTW i’m agree that the documentation is not as good as it can be. BTW i will continue posting update on this topic