Skip to main content

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)

configure-woocommerce-google-analytics-webhook.png

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.

select-when-to-fire-the-event.png

Setup the data you want to send it to Google Analytics

Replace tid to your tracking ID

First replace tid to your tracking ID (UA-XXXXX-X)

replace-tid-to-your-trackingid.png

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

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

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