So I have a client who has 2 products and he wants to track those 2 products with 2 diffrent facebook pixels… What would be the easiest approach in this case so that I don’t have duplicate events inside GA4?
I though about using 2 GTMs, and in this case I need logic to make sure I don’t trigger events twice inside GA4…
Or can I simply use 2 facebook pixels inside the same GTM and just separate them with logic?
When I say logic I mean trigger page views, checkouts, purchases and leads separately for the 2 products because each of them has a separate pixel…
Can you explain in more detail what you mean exactly?
My current setup is that I’m triggering pageviews, checkouts and leads based on the URL because one product has tcb and other has tbb in the url…
For purchases I’m setting that up currently where I will use product ids…
Now from what you said I understood that if tcb product is visited cause that’s the condition for the page view, then I should also have a condition that will use the appropriate pixel for it?
Also, using one GTM and having 2 FB pixels on it to trigger for appropriate products is better than having 2 GTMs to avoid duplicate events for GA4, right?
You can use Data tag and send events through it to the server GTM. This seems to me to be a best practice not to use GA4 for non-Google platforms.
You also don’t need to duplicate GA4 if you do plan to use it and I don’t see the point in using two containers either.
@Alex hey bro thank you for your answer. I ended up using one container, then I used different tags for different pixels because I need to trigger one pixel on product A pages but not on product B pages, and the second pixel needs to trigger on product B pages but not product A pages…
while GA4 should trigger on all pages so that’s setup normally.
I’m using URL with specific naming convention for product A and product B to differentiate the triggering tags for product A vs product B.
You could optimize this further by providing the measurement id dynamically into a single tag instead of using two seperate tags. Not that you need this necessarily