angulartics2 icon indicating copy to clipboard operation
angulartics2 copied to clipboard

GST should support conversion events

Open abbas999 opened this issue 6 years ago • 4 comments

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.

abbas999 avatar Aug 30 '18 04:08 abbas999

The GST supported added today by @adrianduke ?

scttcper avatar Aug 30 '18 04:08 scttcper

Correct. Seems like it supports page views and events but not conversions yet.

abbas999 avatar Aug 30 '18 05:08 abbas999

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 :)

adrianduke avatar Aug 30 '18 10:08 adrianduke

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.

fhewitt avatar Jan 10 '19 21:01 fhewitt