Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Added a way of setting customTrackingParameters to an Event and tracking custom Events. #154

Closed
wants to merge 1 commit into from

Conversation

brototyp
Copy link
Member

@brototyp brototyp commented Jun 3, 2017

Implements: #153

  • Added a event() function to the PiwikTracker that returns an empty event that has core properties already set, such as siteId, visitor, session and such.
  • Added a let customTrackingParameters: [String:String] property to the Event
  • Added a convenience initializer to the Event that copies over all properties from another event and overrides some.
  • Added a function to the PiwikTracker that tracks a custom Event

See all those things in action over here.

Todo:

  • Discuss if this is a good solution
  • Add Documentation to the new public functions
  • Add an entry in the Changelog
  • Add documentation to the Readme

@brototyp brototyp added this to the 4.1.0 milestone Jun 3, 2017
@brototyp brototyp requested a review from thorstenstark June 3, 2017 14:37
@brototyp brototyp changed the title Added a way of setting customTrackingParameters to an Event and tracking custom Events. WIP: Added a way of setting customTrackingParameters to an Event and tracking custom Events. Jun 3, 2017
@thorstenstark
Copy link
Collaborator

Adding custom parameters sounds like a good idea. But what happens when the custom parameters interfere with some (new) piwik parameters? Should piwik-owned parameters be protected in some kind from being overwritten?

@brototyp
Copy link
Member Author

@thorstenstark That's an interesting question. I think it is fine, that the user is able to override existing properties. But we should say so in the documentation.

@brototyp
Copy link
Member Author

brototyp commented Oct 9, 2017

An alternative implementation got merged.

@brototyp brototyp closed this Oct 9, 2017
@brototyp brototyp deleted the feature/153-custom-tracking-parameters branch October 9, 2017 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants