AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
5.6K members online now
5.6K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Cross Device Tracking with User ID | Need Advice

Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆

 

I've enabled cross device tracking with user id on our responsive site. All transactions tracked properly in analytics. But when I refer User ID enabled view, I could see only 30% transactions out of actual count. 

 

We've done it through GTM. 

 

Why all transactions don't track in USER ID enable view? 

 

Can someone please advice me?

 

Thanks

Stephen

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Stephen Oliver
March 2016

Re: Cross Device Tracking with User ID | Need Advice

Top Contributor
# 11
Top Contributor
Hi Stephen,

add the userId field to the transaction tag. This may improve tracking.

Kind regards,
Zorin
Web analyst @ escapestudio.net

View solution in original post

Re: Cross Device Tracking with User ID | Need Advice

Top Contributor
# 2
Top Contributor
Hi Stephen,

some questions:
1. Can a user order without being registered (guest checkout)?
2. Did you debug all hits for userId parameter present?
3. Are you looking at the time range to include time only when the userId feature was present?

Kind regards,
Zorin
Web analyst @ escapestudio.net

Re: Cross Device Tracking with User ID | Need Advice

Follower ✭ ✭ ☆
# 3
Follower ✭ ✭ ☆

Hi Zorin,

;

1) No, login is must for all orders.
2) Do you mean to say, When someone login into site at that time does analytics track respective user ID always? - YES, it does track.
3) Yes, I've enabled user id since 2nd week of January, and I'm referring current data only

 

Please refer below given debug view of homepage, after login.

Running command: ga("create", "UA-123456", {name: "gtm1457590345147", allowLinker: true, cookieDomain: "auto"})
Creating new tracker: gtm1457590345147
Auto cookieDomain found: "example.com"
Running command: ga("gtm1457590345147.set", "&gtm", "GTM-123456")
Running command: ga("gtm1457590345147.set", "dimension1", "97778")
Running command: ga("gtm1457590345147.set", {userId: "97778"}) Running command: ga("gtm1457590345147.set", "hitCallback", [function]) Running command: ga("gtm1457590345147.require", "displayfeatures", undefined, {cookieName: "_dc_gtm_UA-123456"})
Set called on unknown field: "dcLoaded".
Plugin "displayfeatures" intialized on tracker "gtm1457590345147".
Running command: ga("gtm1457590345147.send", "pageview")

Sent beacon: v=1&_v=j41d&a=150360052&t=pageview&_s=1&dl=https://www.example.com/&ul=en-us&de=utf-8&dt=Testing Title&sd=24-bit&sr=1366x768&vp=1349x150&je=0&fl=21.0 r0&_u=qccageab~&jid=&cid=542711948.1457590184&uid=97778&tid=ua-123456&gtm=gtm-123456&cd1=97778&z=671984289/ <unknown> (&gtm) GTM-123456 _j1 (&jid) adSenseId (&a) 1212121212 apiVersion (&v) 1 clientId (&cid) 542711948.1457590184
dimension1 (&cd1) 97778 encoding (&de) UTF-8 flashVersion (&fl) 21.0 r0 hitType (&t) pageview javaEnabled (&je) 0 language (&ul) en-us location (&dl) https://www.example.com/
screenColors (&sd) 24-bit screenResolution (&sr) 1366x768 title (&dt) Testing Title trackingId (&tid) UA-123456 userId (&uid) 97778 viewportSize (&vp) 1349x150 Running command: ga("gtm1457590345147.require", "linker")
Plugin "linker" intialized on tracker "gtm1457590345147".
Running command: ga("gtm1457590345147.linker:autoLink", ["barclaycard.co.uk", "example.com"], false, true)

 

Re: Cross Device Tracking with User ID | Need Advice

Top Contributor
# 4
Top Contributor
Hi, I can see the uid parameter so all should be fine. As I see you are also sending the uid as a custom dimension so can you check if all transactions have that custom dimension assigned?

One other thing - in your autolink domain list you have barclayscard - this domain should only be there if you can place your code on that domain and in any case place it in the referral exclusion list.

Kind regards,
Zorin
Web analyst @ escapestudio.net

Re: Cross Device Tracking with User ID | Need Advice

Follower ✭ ✭ ☆
# 5
Follower ✭ ✭ ☆

Hi Zorin,

 

Thank you very much for quick reply.

 

1) Yes USER ID is reported for all transactions [in User ID View].

2) Let me explain, I'm not much sure about it from begining.

 

Running command: ga("gtm1457602891931.linker:autoLink", ["barclaycard.co.uk", "barclaycardsmartpay.com", "barclays.co.uk", "securesuite.net", "arcot.com", "securetrading.net", "cardcenter.ch", "lloydstsb.com", "postfinance.ch", "sia.eu"], false, true)

 These are external payment gateway URLs, and one of them will appear during checkout. After filling payment details it redirects to https://example.com/thanks.php [Order Confirmation] page.

 

We don't have analytics code on payment gateway pages.

  

We've to add them into referral exclusion list and auto linker [GTM] to avoid below situation when original traffic source / medium is overwrite for all transactions and display above domains as a source referral traffic. 

download.png

 

Please correct me if I'm wrong.

 

Thanks

Stephen

Re: Cross Device Tracking with User ID | Need Advice

Top Contributor
# 6
Top Contributor
Hi Stephen,

Back to question 1.
Can you see the custom dimension (uid value) in the non user id view being applied to transactions correctly?

2. These external payment gateways cannot be tracked so there is no need to append the linker param with auto linker or manually - the only thing you need to do is place all PGs in referral exclusion.

Prerequisites for Cross domain tracking (basic) are:
1. You collect data from all sites in one single property
2. Code needs to be placed on all tracked domains
3. _ga linker parameter or cid / client id needs to be passed on from one domain to another

In your case #2 is an issue and partially #1.

Kind regards,
Zorin
Web analyst @ escapestudio.net

Re: Cross Device Tracking with User ID | Need Advice

Follower ✭ ✭ ☆
# 7
Follower ✭ ✭ ☆

Hello Zorin,

 

1) Yes, I'm able to see proper user ids for all transactions in normal view. I didn't know that before.

 

2) As I don't set analytics in payment gateway, Should I need to remove below parameters from GTM?

 

allowLinker: true [Remove]
cookieDomain: auto [Remove]
Auto Link Domains [Remove]
Decorate Forms: True [Remove]

 

[Please refer below image for current view]

 

Prerequisites for Cross domain tracking (basic) are:

 

2.1) You collect data from all sites in one single property.
==> We have only one domain [www.example.com], except payment gateway. User don't need to visit any other site to make order OR to browse further. So I guess this point is not applicable.

 

2.2) Code needs to be placed on all tracked domains
==> Not applicable, [Reason same as 2.1]

 

2.3) _ga linker parameter or cid / client id needs to be passed on from one domain to another
==> I don't understand completely but I guess it is not applicable. [Reason same as 2.1]

 

Please correct me if I'm wrong.

 

Please suggest me how can I view all orders in user id view? And How to optimize issues mentioned in point #2?

 

 

GTM.png

 

Re: Cross Device Tracking with User ID | Need Advice

Follower ✭ ✭ ☆
# 8
Follower ✭ ✭ ☆
Hi Zorin,

I've little update to share, I just confirmed with my developers that we can insert analytics code through iframe in payment gateway page.

Thanks
Stephen

Re: Cross Device Tracking with User ID | Need Advice

Top Contributor
# 9
Top Contributor
Hi Stephen,

no need to do that as it is only the PG page you will be tracking and you in any case have the thank you page on success. Could you please make a test transaction and send me the debug. A situation may occur where the userId parameter is not passed on for ALL hits (and it needs to be - including the Pageview / event with transaction data if EE or the transaction hit if classic ecommerce is used).

Kind regards,
Zorin
Web analyst @ escapestudio.net

Re: Cross Device Tracking with User ID | Need Advice

Follower ✭ ✭ ☆
# 10
Follower ✭ ✭ ☆

Hi Zorin, 

 

Please have a look at below debug information.  

 

Loading resource for plugin: ecommerce
Loading script: "https://www.google-analytics.com/plugins/ua/ecommerce.js"
Running command: ga("create", "UA-123456-1", {name: "gtm1457705858185"})
Creating new tracker: gtm1457705858185
Running command: ga("gtm1457705858185.set", "&gtm", "GTM-A1B2C3")
Running command: ga("gtm1457705858185.set", "anonymizeIp", undefined)
Running command: ga("gtm1457705858185.set", "hitCallback", [function])
Running command: ga("gtm1457705858185.require", "ecommerce", "//www.google-analytics.com/plugins/ua/ecommerce.js")
Waiting on require of "ecommerce" to be fulfilled.
Executing Google Analytics commands.
Registered new plugin: ga(provide, "ecommerce", Function)
Running command: ga("gtm1457705858185.require", "ecommerce", "//www.google-analytics.com/plugins/ua/ecommerce.js")
Plugin "ecommerce" intialized on tracker "gtm1457705858185".
Running command: ga("gtm1457705858185.ecommerce:addTransaction", {id: "606010174", affiliation: "Web Site", revenue: "42.50", shipping: "0.00", tax: "0.00"})
Running command: ga("gtm1457705858185.ecommerce:addItem", {id: "606010174", sku: "16074", name: "Shirt", category: "Men", price: "42.50", quantity: "1"})
Running command: ga("gtm1457705858185.ecommerce:send")
Setting throttling cookie: "_gat_UA-123456-1"

Sent beacon:
v=1&_v=j41d&a=12121&t=transaction&_s=1&dl=https%3A%2F%2Fwww.example.com%2Fthanks.php&dr=https%3A%2F%2Ffresh.ampop.com…GTM-A1B2C3&ti=606010174&ta=Web%20Site&tr=42.50&ts=0.00&tt=0.00&z=304277269

<unknown>        (&gtm) GTM-A1B2C3
_j1              (&jid) 914068230
adSenseId        (&a)   12121
apiVersion       (&v)   1
clientId         (&cid) 1149321355.1457702793
ec:affiliation   (&ta)  Web Site
ec:id            (&ti)  606010174
ec:revenue       (&tr)  42.50
ec:shipping      (&ts)  0.00
ec:tax           (&tt)  0.00
encoding         (&de)  UTF-8
flashVersion     (&fl)  21.0 r0
hitType          (&t)   transaction
javaEnabled      (&je)  0
language         (&ul)  en-us
location         (&dl)  https://www.example.com/thanks.php
referrer         (&dr)  https://fresh.ampop.com/gpp/123.shtml
screenColors     (&sd)  24-bit
screenResolution (&sr)  1366x768
title            (&dt)  Order Complete - Thanks!
trackingId       (&tid) UA-123456-1
viewportSize     (&vp)  1349x369

Sent beacon:
v=1&_v=j41d&a=12121&t=item&_s=2&dl=https%3A%2F%2Fwww.example.com%2Fthanks.php&dr=https%3A%2F%2Ffresh.ampop.com…e&iv=Men&ip=42.50&iq=1&z=533553962

<unknown>         (&gtm) GTM-A1B2C3
_j1               (&jid) 
adSenseId         (&a)   12121
apiVersion        (&v)   1
clientId          (&cid) 1149321355.1457702793
ec:id             (&ti)  606010174
ec:item code      (&ic)  16074
ec:item name      (&in)  Shirt
ec:item price     (&ip)  42.50
ec:item quantity  (&iq)  1
ec:item variation (&iv)  Men
encoding          (&de)  UTF-8
flashVersion      (&fl)  21.0 r0
hitType           (&t)   item
javaEnabled       (&je)  0
language          (&ul)  en-us
location          (&dl)  https://www.example.com/thanks.php
referrer          (&dr)  https://fresh.ampop.com/gpp/123.shtml
screenColors      (&sd)  24-bit
screenResolution  (&sr)  1366x768
title             (&dt)  Order Complete - Thanks!
trackingId        (&tid) UA-123456-1
viewportSize      (&vp)  1349x369
Running command: ga("create", "UA-123456-1", {name: "gtm1457705858186", allowLinker: true, cookieDomain: "auto"})
Creating new tracker: gtm1457705858186
Auto cookieDomain found: "example.com"
Running command: ga("gtm1457705858186.set", "&gtm", "GTM-A1B2C3")
Running command: ga("gtm1457705858186.set", "dimension1", "87889")
Running command: ga("gtm1457705858186.set", {userId: "87889"})
Running command: ga("gtm1457705858186.set", "hitCallback", [function])
Running command: ga("gtm1457705858186.require", "displayfeatures", undefined, {cookieName: "_dc_gtm_UA-123456-1"})
Set called on unknown field: "dcLoaded".
Plugin "displayfeatures" intialized on tracker "gtm1457705858186".
Running command: ga("gtm1457705858186.send", "pageview")

Sent beacon:
v=1&_v=j41d&a=12121&t=pageview&_s=1&dl=https%3A%2F%2Fwww.example.com%2Fthanks.php&dr=https%3A%2F%2Ffresh.ampop.com…57702793&uid=87889&tid=UA-123456-1&gtm=GTM-A1B2C3&cd1=87889&z=1473369600


<unknown>        (&gtm) GTM-A1B2C3
_j1              (&jid) 
adSenseId        (&a)   12121
apiVersion       (&v)   1
clientId         (&cid) 1149321355.1457702793
dimension1       (&cd1) 87889
encoding         (&de)  UTF-8
flashVersion     (&fl)  21.0 r0
hitType          (&t)   pageview
javaEnabled      (&je)  0
language         (&ul)  en-us
location         (&dl)  https://www.example.com/thanks.php
referrer         (&dr)  https://fresh.ampop.com/gpp/123.shtml
screenColors     (&sd)  24-bit
screenResolution (&sr)  1366x768
title            (&dt)  Order Complete - Thanks!
trackingId       (&tid) UA-123456-1
userId           (&uid) 87889
viewportSize     (&vp)  1349x369
Running command: ga("gtm1457705858186.require", "linker")
Plugin "linker" intialized on tracker "gtm1457705858186".
Running command: ga("gtm1457705858186.linker:autoLink", ["arclap.co.uk", "example.com", "ampop.com"], false, true)