Skip to content
This repository has been archived by the owner on Dec 12, 2019. It is now read-only.

events implementation has changed #8

Closed
oguzhankahyaoglu opened this issue Jul 12, 2016 · 2 comments
Closed

events implementation has changed #8

oguzhankahyaoglu opened this issue Jul 12, 2016 · 2 comments

Comments

@oguzhankahyaoglu
Copy link

oguzhankahyaoglu commented Jul 12, 2016

take a look at this link: https://developers.google.com/analytics/devguides/collection/analyticsjs/events#implementation

Using your script, events are not recorded. It should be in this form:

ga('send', {
  hitType: 'event',
  eventCategory: 'Videos',
  eventAction: 'play',
  eventLabel: 'Fall Campaign'
});
@oguzhankahyaoglu oguzhankahyaoglu changed the title events i events implementation has changed Jul 12, 2016
@WhitWaldo
Copy link
Contributor

@oguzhankahyaoglu Looking at that documentation, I'm not seeing how the original is incorrect or that this has been changed in some way. As it says on that page "as with all send commands, the fields passed in the convenience parameters may also be specified in the fieldsObject."

Thus, using your example, you can use either:

ga('send', 'event', 'Videos', 'play', 'Fall Campaign');

or

ga('send', {'hitType': 'event', 'eventCategory': 'Videos', 'eventAction': 'play', 'eventLabel': 'Fall Campaign'});

Within GA, there's functionally no difference between the two - it'll take either one.

@MisterPhilip I don't see that a change is necessary here.

@MisterPhilip
Copy link
Owner

Yup, either way here is correct! No change is required.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants