Send UTMs from WooCommerce to Google Analytics
Enable Ecommerce Tracking in Google Analytics
You should enable this in your Google Analytics account. Information how to do it can be found here
Configure Google Analytics Webhook in HandL UTM Grabber
We have a preloaded configuration that will allow you to send UTMs or event data to Google Analytics as soon as a status of order change in WooCommerce (payment_complete, order_status_pending, order_status_failed, order_status_on-hold, order_status_processing, order_status_completed, order_status_refunded, order_status_cancelled)
Select WHEN to send data to Google Analytics
We recommend sending the data to Google Analytics as soon as payment complete. That's why we auto-populate that hook out of the box. You can configure the other fields the same way.
Setup the data you want to send it to Google Analytics
You can use HandL URL builder to configure your fields easier. Click the icon next to the input field shown in the image below.
To remove a paramater from the payload, click the red remove icon. To add a new parameter click "+ Add New Parameter" button at the bottom. To save the progrees, click "Save" like shown in the image below.
Replace tid to your tracking ID
First replace tid to your tracking ID (UA-XXXXX-X)
Configure your data
You can send almost any data that generated in WooCommerce to Google Analytics. There are few rules to follow. We configured the few fields out of the box for you. However you can add your own field in addition to this.
Pay attention to the value key pairs that is specific to Google Analytics. You can find more information here
If you need to cast/format a variable into string, integer or float simply add (int)
, (str)
or (float)
before your variable. This is especially required for Event Value field as shown below.
v=1&
t=event&
tid=UA-XXXXX-X&
cid=wc|data__customer_id&
ti=wc|data__order_key&
tr=wc|data__total&
tt=wc|data__total_tax&
ts=wc|data__shipping_total&
tcc=COUPON&
pa=purchase&
pr1id=wc|product__id&
pr1nm=wc|product__name&
pr1qt=1&
pr1pr=wc|data__total&
ni=1&
cu=USD&
cn=wc|meta__utm_campaign&
cs=wc|meta__utm_source&
cm=wc|meta__utm_medium&
ck=wc|meta__utm_keyword&
cc=wc|meta__utm_content&
ec=HandLEventCat&
ea=HandLEventAction&
el=HandLEventLabel&
ev=(int)wc|data__total
In addition to that;
You can send/track/collect any WooCommerce order data parameters as follows:
wc|data__status //order status
wc|data__currency //order currency
wc|data__discount_total //order total discount
wc|data__shipping_total //order total shipping
wc|data__total //order total
wc|data__total_tax //order total tax
wc|data__customer_id //order custom id
wc|data__order_key //order id
wc|data__billing__first_name //order customer first name
wc|data__billing__last_name //order customer last name
wc|data__billing__address_1 //order customer address
wc|data__billing__city //order customer city
wc|data__billing__state //order customer state
wc|data__billing__postcode //order customer postalcode
wc|data__billing__email //order customer email address
wc|data__billing__phone //order customer phone number
wc|data__payment_method //order method of payment (e.g. card, cash etc)
You can send/track/collect any WooCommerce order meta data parameters as follows:
wc|meta__gclid
wc|meta__utm_campaign
wc|meta__utm_source
wc|meta__utm_medium
wc|meta__utm_terms
wc|meta__utm_content
wc|meta__handl_original_ref
wc|meta__handl_landing_page
wc|meta__handl_ref
wc|meta__organic_source
wc|meta__first_gclid
wc|meta__first_utm_campaign
wc|meta__first_utm_source
wc|meta__first_utm_medium
wc|meta__first_utm_terms
wc|meta__first_utm_content
You can send/track/collect any WooCommerce product data parameters as follows:
wc|product__name
wc|product__product_id
wc|product__variation_id
wc|product__quantity
wc|product__total
wc|product__total_tax
The data will be populated in your Google Analytics
Once an order placed and an event satisfied (payment completed), HandL UTM Grabber post the order data (configured above) to Google Analytics. You will be able to access the data in Google Analytics like this.