Closed nfmohit closed 2 months ago
- Create a new store definition in
assets/js/modules/analytics-4/datastore/service.js
.
Hi @techanvil, just to confirm, shouldn't this be assets/js/modules/reader-revenue-manager/datastore/service.js
instead?
Thanks @nfmohit, apologies for the copy/paste fail! This is now fixed, cheers.
Brilliant, thanks @techanvil! IB ✅
I've created the PR: https://github.com/google/site-kit-wp/pull/8953 for this issue, but keeping this issue in Execution because its dependencies #8786 is yet to be merged.
Once merged, the base branch for this PR needs to be changed to develop
and test everything and move this to CR.
I did some tests and results and queries are as follows:
It's worth noting that the URLs have a lot of symbols with %, etc.. In the AC, there is no mention of those symbols and add ons. The link works but are we expecting these? ⚠️
It's not @get10up.com but %40get10up.com
Hi @kelvinballoo ,
Thank you for testing this issue.
Only getserviceURL() - While the link goes to the Publisher central page initially, it goes directly to the publication afterwards. ⚠️ Refer to the attached video :
the publication ID query parameter is added by publisher centre automatically and we do not have the control over it. As you demonstrated in your video, even if we simply visit https://publishercenter.google.com/, that query parameter is getting appended in the URL.
It's worth noting that the URLs have a lot of symbols with %, etc.. In the AC, there is no mention of those symbols and add ons. The link works but are we expecting these? ⚠️
This is fine as the getServiceURL
selector will encode the URL so that all the parameters and values can be passed safely.
Thanks for the update @ankitrox
Executed with the following scenarios:
Invalid publication ID - Link will go the the publisher page but would not open. It's expected ✅
Valid publication ID - Link will go to the correct Publisher publication page. ✅
Only getserviceURL() - Link goes to the Publisher central page initially and goes directly to the publication afterwards but this is fine as that's the way the RRM works. ✅ Video for reference: https://github.com/user-attachments/assets/0c9a4552-0b3b-4216-aa49-1eddf24219e1
Link to the RRM platform includes the following: ✅
Symbols with the URL encoding is fine as clarified.
Moving this ticket to approval.
Feature Description
The
getServiceURL()
selector should be implemented for the Reader Revenue Manager module that should return a prepared link to the Reader Revenue Manager platform that meets this criteria.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
getServiceURL()
selector should be added to the Reader Revenue Manager module data store.https://publishercenter.google.com/
.https://publishercenter.google.com/reader-revenue-manager?publication=PUBLICATION_ID
.utm_source=sitekit
.Implementation Brief
assets/js/modules/reader-revenue-manager/datastore/service.js
.selectors
object, which in turn contains thegetServiceURL()
selector.getServiceURL()
should accept an optionalpublicationId
parameter and implement the logic as defined in the AC to determine the link.getAccountChooserURL()
to wrap the link with the Google account chooser URL.getServiceURL()
implementation for some pointers.Test Coverage
QA Brief
You must get the URL like following
Notice that email will be replaced with your account email.
Clicking on the above link should take you to the publisher center, but page will open in publisher center only if the publication ID is valid (in this case
ABCDEFGH
which is invalid). You can create a publication in https://publishercenter.google.com/ to get the publication ID.Again, in the browser console, run the following script:
Changelog entry