segmentio/analytics.js-integrations — pull request #444 by sperand-io (2014-10-28 00:16:38+00:00)
Title: adds GA support for explicitly passed campaign info

Ember apparently strips query string params (?), so normal/automatic UTM parsing is not an option for those users. Two recent tickets in zendesk about this. So we want to also respect campaign parameters passed explicitly in the context object.

google field reference: https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#campaignName

example of the direct call this implementation is modeled after working as expected:

![](https://cldup.com/A4H7_Kii62.png)

leads to:

![](https://cldup.com/Gt2cfnuSwp.png)

and all subsequent pageviews/events *in the session* are also attributed to that campaign, because of the processing flow in this chart: https://developers.google.com/analytics/devguides/platform/campaign-flow