-
Notifications
You must be signed in to change notification settings - Fork 58
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 a new field custom URL Referrer on pageview tag #566
base: 5.x-dev
Are you sure you want to change the base?
Conversation
Being able to set a custom Url Referrer for pageviews is handy when you are working with SPA tracking. It can also be handy of referrers contain PII data to be able to clan these values before they are posted to Matomo.
Adding new setting for urlRef + tests + en translation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking the time to create this PR, @tomper00 . I think it looks really good. The only request I have is that you create a migration similar to the one you created in your other PR. I guess another option would be to wait until your other PR is merged, merge those changes into this branch, and then simply add a single $migrator->addField('customUrlRef');
line to the migration your created as part of your other PR.
Oh. One other side note. Please remember to add the Needs Review
label to any PRs that you create in the future. It just makes it more visible to our team and lets us know that it's ready for us to provide feedback.
Ok thanks again for the feedback @snake14 I will go with the option to merge my branches, that sounds like an easy way forward. |
@tomper00 I just left a comment on your other PR, but I realised that I had you use the wrong class for the migration. Since this one is for a tag, you would use the
So, if you merge the two branches, you would run |
Translation updates based on comments from @AltamashShaikh Co-authored-by: Altamash Shaikh <[email protected]>
Update test to match new translation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I just left one comment.
Updates/4.12.4-b2.php
Outdated
$migrator = new NewTagParameterMigrator(MatomoTag::ID, 'customUrlRef'); | ||
$migrator->migrate(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you merged the changes from your other branch into this one, you don't have to create a new migration script. You should be able to add the two lines from the doUpdate
method in this one to the end of the doUpdate
in the existing migration script. That way both your variable and tag changes get migrated in the same script. I guess it doesn't hurt to have two separate scripts, but it makes the release process a little more complicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | ||
* Update for version 4.12.4-b1. | ||
*/ | ||
class Updates_4_12_4_b3 extends PiwikUpdates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that this will error out if the class name doesn't match the file name. Could you please update it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomper00 would you please be able to update the class name to match the file name?
@tomper00 Any update on this ? |
Description:
This is often needed when you work with SPA tracking since the Referrer often is not updated on virtual pageviews.
It is also nice to be able to create a custom JS Variable some times to be able to filter out PII etc.
Review