Hi,
If you wish to have a separate property for each domain, then you need to create all properties on the GA UI one by one and then use a lookup table variable in Google Tag Manager to select the data stream ID for each domain based on the {{Page Hostname}} variable.
You can then use this variable in your GA4 Config Tag in the Measurement ID field.
Thread Starter
febeks
(@febeks)
Thanks for your reply.
Not sure if I understand you correctly.
My current situation is that I already have separate prooperties for each domain (I used to have 2 separate wordpress sites) and I was using GTM4WP on both of them, including ecommerce settings (I have eshops).
Now what I did was I added a new string translation for GTM4WP measurment ID field in WPML string translations, hoping that for sites with other languages under different domain will use that ID since its in translation. But unfortunately, this doesnt work.
In your reply, what do you mean by lookup table in GTM?
Or are you trying to say that the way I did this with tralslation of the ID doesnt work, but I have to use only one GTM ID and on the GTM side I have to setup data stream ID… right?
Thread Starter
febeks
(@febeks)
Nevermind, I did my homework and managed to set it all up. For others, this article helped in doing so: https://dataenthusiast.it/english-version/google-tag-manager-lookup-table-variable/
make sure you enter only “domain.com” without https or www (didnt work for me with these)
Btw, thanks for your initial reply and support 🙂
-
This reply was modified 3 years, 10 months ago by
febeks.