-
Notifications
You must be signed in to change notification settings - Fork 290
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
Implement date range services for PAX reporting #8687
Comments
Works for me 👍🏻 IB ✅ |
QA Update: ❌@tofumatt @zutigrm I start the process of setting up Ads module for PAX, click on the create account button, and then I am sent to the oAuth as expected. When I return back to Site Kit, the app doesn't load and instead I see an error message. See screenshot.
|
QA Update: ✅Verified:
pax-dates.mp4 |
Looks like the range in the widget is off by 1 on both sides but we can enhance this in a follow-up if needed. |
Feature Description
For PAX to integrate into the same date range used on the dashboard, we need to implement two services for this to be requested by Ads (partner) and updated by SK (ads).
Note regarding dependency on #8559: It won't be possible to QA this issue until #8559 is merged, but you could start work on this issue before then. 🙂 As noted by @aaemnnosttv:
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
YYYY-MM-DD
) and returns an object with the shape{ day, month, year }
(allNumbers
) as defined asDate
: https://github.com/google/partner-ads-experience/blob/c2799dd0b6306a3d598e6584e0033662c4461bde/sdk/service/ads/ads-date-range-service.d.ts#L19-L32Note
Date
is its own type here notably using 1-index numbers rather than 0-indexcreatePaxServices
to implement a new top-levelpartnerDateRangeService
with its methodsget
- returns aGetSelectedDateRangeResponse
, an object with the shape{ startDate: Date, endDate: Date }
getDateRangeDates
to get start and end dates as strings, then transform with the new utility to get the necessary dates for the responsePAXEmbeddedApp
whendisplayMode
=reporting
getDateRangeDates
useEffect
to synchronize the current date range with the appUpdateSelectedDateRangeRequest
(which is the same shape as theGetSelectedDateRangeResponse
) using the same utilityappServices.adsDateRangeService.update(UpdateSelectedDateRangeRequest)
useEffect
to ensure it runs whenever the range changes, i.e.${startDate}|${endDate}
Test Coverage
partnerDateRangeService
as an addition tocreatePaxServices
PAXEmbeddedApp
as a wrapper for an external appQA Brief
adsPax
feature flagcreate an account
button on Ads setup screen) - go through all the steps in the PAX to create a campaignChangelog entry
The text was updated successfully, but these errors were encountered: