cordova-plugin-tag-manager icon indicating copy to clipboard operation
cordova-plugin-tag-manager copied to clipboard

User ID

Open ema1argentina opened this issue 9 years ago • 6 comments

Hi Everyone,

Do you know how to configure the UserId using this plugin? I am new to GTM, and I don't know if I'll be able to achieve this using this plugin.

https://support.google.com/analytics/answer/3123666?hl=en

Best Regards, Emanuel

ema1argentina avatar Feb 03 '16 17:02 ema1argentina

You can use userId with the pushEvent method. You can use pushEvent with all hits (sceen views, events, transactions...)

jreidel avatar May 26 '16 10:05 jreidel

@jreidel cool, but, there is no documentation for this, do you have an example?

raphaelgodoi avatar Jun 10 '16 18:06 raphaelgodoi

@raphagodoi In this pull you can find the doc for the pushEvent method: https://github.com/zwacky/cordova-plugin-tag-manager/blob/6d2bf4813077aa7288f606103c5c5f790e1912b4/README.md#tagmanagerpushevent

bitumin avatar Sep 15 '16 07:09 bitumin

Anyone had has any success with this?

I have been able to emulate the other functions with pushEvent, but the userId doesn't work sadly. Also tried with a custom dimension1 but no success either way... This is how I have it just now.

Event Example 2016-11-22-133041_641x217_scrot

trackPage example 2016-11-22-133304_628x153_scrot

on GTM I have two new variables 2016-11-22-133532_1043x479_scrot and 2016-11-22-133603_993x490_scrot

On the GA tag Events I have: 2016-11-22-133642_891x576_scrot and on Pageviews GA Tag: 2016-11-22-133729_901x370_scrot

Note: Just changed dimension1 from Fields to Set to Custom Dimensions and waiting for data to appear on GA to see if the custom dimension works.

Also on GA I do have User-ID feature enabled. 2016-11-22-134010_737x333_scrot

Thanks!.

diegomichel avatar Nov 22 '16 20:11 diegomichel

Hello guys,

It worked sending &uid instead of userid. Keep in mind that changes to GTM containers take some time to reflect on the app(sometimes hours). Hope this helps.

2016-12-08-110215_232x152_scrot

Best Regards, Diego Michel.

diegomichel avatar Dec 08 '16 18:12 diegomichel

Thanks, Diego! Excellent way of giving a solution, really appreciate you for this. You may be right, the data is not appearing immediately in User ID view of GA. It is taking lot of time to reflect.

I've a question - does this work well for both iOS and Android? The steps needed to set up GTM for Android are same as that of iOS? Can you please specify how to move ahead with Android?

Many thanks!

sunayanagoyale avatar May 12 '17 10:05 sunayanagoyale