Hi,
Using GTM4WP you will have the enhanced ecommerce implementation of Google in the data layer out of the box. This will include all the necessary data for your Bing Ads tag as well. Other GTM related plugins might not give you that data.
You will need to create a new Data Layer Variable on the GTM UI and enter this variable name:
ecommerce.purchase.actionField.revenue
This will return the revenue of the order that has been just placed.
Thanks! I’ll need to select “Order data in data layer” in woocommerce integration too?
No, it is not related to enhanced ecommerce. You might need this option in other cases where for example you would like to run a personalization with Google Optimize.
Very interesting, so I need to have enhanced ecommerce enabled in GA, then with stock GTM4WP settings I can grab ecommerce.purchase.actionField.revenue as a the variable name for the order revenue value? Do I have that right?
Not exactly, you do not need to enable enhanced ecommerce in GA.
You need to activate the corresponding function in GTM4WP plugin settings on your WP admin.
This will populate the data layer with the required data.
Sorry for being dense, but what is the corresponding function to get the order data into the data layer if it’s not the “Order data in data layer” option in woocommerce integration tab?
The “order data in data layer” could be one source but this will be populated if the user revisits the order received page with the already tracked order ID.
On the same plugin page where you found the “Order data in data layer” option there will be another option called “Track enhanced e-commerce”. Enable this option. This will give you the data layer variable on the order received page that I mentioned earler in this thread. And this time, you will get the data only on the first appearance of the order received page for a specific order ID.
Got it, thanks so much for your patience!
Hi Thomas,
Sorry to resurrect an old thread.
Having some difficulties myself along the same path as Greg.
For some reason ecommerce.purchase.actionField.revenue declares as undefined when viewing in GTM preview.
I have Enhanced Tracking all setup and working for Google Analytics.
However, attempting to set up Variable Revenue for Bing PPC ads is proving more difficult.
Are you able to shed any light on the issue?