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

More campaigns, path, pvId #109

Merged
merged 7 commits into from Jun 6, 2023
Merged

Conversation

EPNW-Eric
Copy link
Contributor

I did some more research and testing regarding campaigns and added those findings to the documentation.

However, one key learning is that not only page views can have campaigns, but other actions like events or content tracking, too.
In retrospective, this seems only logical, since the campaign settings are encoded in the url parameter and it turned out that the url parameter is actually used in every track... call in the JavaScript Tracker, what kind of supprised me:

But to conclude I now think that every track... call should have the possibility to set a campaign and a path (what relates to having an url in our case). Imo the path is related to the page view (just as pvId) but a developer should have the opportunity to manually set it, so my approach was to add the path parameter to every track... call (with appropriate documentation) and change attachLastPvId to attachLastScreenInfo so it not only accounts for the automatical attachment of pvId but also of path. Futhermore I found out, that most track... calls can have a pvId (until now I thought only event and content tracking can have one), so I added it as parameter. If someone is interested in those additional tests, they can be found here.

I also added search and outlink tracking to the example (because I wanted to see how it looks like in the dashboard), and fixed a small macro mistake.

Finally I want to propose to rename trackScreen to trackPageView and trackScreenWithName to trackPageViewWithName since the documentation always refers to the thing they track as page views. This would also imply changing screenId in MatomoAction to pvId.

Copy link
Member

@TesteurManiak TesteurManiak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, maybe we should consider in the future creating an object (e.g: ScreenInfo) to hold the pvId, path and campaign values altogether 🤔

@TesteurManiak TesteurManiak self-assigned this Jun 6, 2023
@TesteurManiak TesteurManiak added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 6, 2023
@TesteurManiak TesteurManiak merged commit 6cb95b4 into Floating-Dartists:dev Jun 6, 2023
2 checks passed
@EPNW-Eric EPNW-Eric deleted the more_campaigns branch June 12, 2023 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants