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

Add auto-url-generation #197

Closed
brototyp opened this issue Oct 27, 2017 · 6 comments
Closed

Add auto-url-generation #197

brototyp opened this issue Oct 27, 2017 · 6 comments

Comments

@brototyp
Copy link
Member

Proposal:

  • Add a new property contentBaseUrl to the PiwikTracker
  • If this property is set, every event that has no url set will generate one by its own
  • To generate a url, it will use the contentBaseUrl and append the action-array as path

Example:

@brototyp
Copy link
Member Author

brototyp commented Oct 27, 2017

After a bit debugging I figured that though the url is an optional in the API, it is basically non-optional for page views, since most features rely on the url instead of the actions (which I thought).

What does the user loose without the url for page views:

  • The Visitor Log lacks the list of pages
  • Actions -> Pages lack the list of pages
  • Actions -> Entry pages and Exit pages are empty

Because of that, I think the contentBaseUrl should not be nil per default, but rather http://<app-id> per default and still be overridable for custom urls.

I am not sure if we should use this method only for page-views or for all Events, so for actions as well.

@thbaja
Copy link

thbaja commented Nov 1, 2017

I think we should use it for all events. Currently I'm wrapping the piwik call in order to always set the url, both for page-views and actions. This makes it easier to compare web and app behaviour as well as monitor total usage.

@brototyp
Copy link
Member Author

brototyp commented Nov 1, 2017

Sounds like a great plan. So like this?

  • contentBaseUrl is per default derived from the App id
  • If one doesn't want to auto-create any url, it is possible to set the contentBaseUrl to nil
  • If one want to define the url on a per Event level, it overrides automatic created urls

@thbaja
Copy link

thbaja commented Nov 1, 2017

Sounds good. That way we give sufficient flexibility to handle all the use-cases I can think of (off the top of my head) .

@brototyp
Copy link
Member Author

brototyp commented Nov 1, 2017

I just checked the Android sdk on how the contentBase is generated there and copied it see.

I just created a PR on this issue.

@brototyp
Copy link
Member Author

Just released version 4.4.0 containing this feature.

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

No branches or pull requests

2 participants