angulartics2
angulartics2 copied to clipboard
GST should support conversion events
To measure ad conversions, the Google Global Site Tag has a send_to parameter - for example: gtag('event', 'conversion', { 'send_to': 'AW-XXXXXX/R-12345678', 'transaction_id': '' });
This doesnt seem to be supported in angulartics right now. Would be great to have support for it.
The GST supported added today by @adrianduke ?
Correct. Seems like it supports page views and events but not conversions yet.
You might be able to get it to work already with the eventTrack()
method. If you send a gstCustom
key in the properties
you can send custom key=>value pairs, you can see how the exceptionTrack()
uses it. You'll get all the event_category
, event_label
, value
and non_interaction
sent with the event so I'm not 100% certain it will work but it might.
angulartics2.eventTrack.next({
action: 'conversion',
properties: {
'gstCustom': {
'send_to': 'AW-XXXXXX/R-12345678',
'transaction_id': '',
},
},
});
Otherwise the code is pretty simple to extend :)
Yes, the gstCustom cover the requirement. It's just not documented here.
I think I will send another PR for that, next time I put my hands in this project.