-
Notifications
You must be signed in to change notification settings - Fork 278
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
Scaffold PAX launch dependencies #8556
Comments
@aaemnnosttv @tofumatt I know we had the |
@10upsimon Thanks so much for the details on this one. 🙂 I think the ACs here are too hard to scan and easily check off. There's extra context around the criteria that is better-placed in the issue description. It's a minor thing, but having the ACs as more of a "checklist" and the description being the context/background means it's easier to see if the issue is complete according to ACs or not. The ACs here are too long and varied to reasonably consider them "met". Words like "probably" are dangerous in ACs too, so things like:
should be more concrete. I'd rather this be:
I'm happy to give it a go and filter things down too, after you run through it again 🙂 |
I've revised the approach here a bit to be simplified and leverage WP assets and pass the base config from the backend which eliminates the need for another helper and related datastore bits for now. IB ✅ |
QA Update ✅
|
Feature Description
This issue is for adding the minimal infra needed to be able to launch PAX, particularly the
token
and base infrastructure for partner services.The minimum requirements for launching PAX can be found in the "Launching the App" section of the design document.
PAX has a few minimum requirements in order to successfully launch the application, namely the following:
https://www.gstatic.com/pax/${version}/pax_integrator.js
)google.ads.integration.integrator.launchGoogleAds()
To see a demo/proof-of-concept PAX plugin, check out this Gist: https://gist.github.com/tofumatt/f9ff5ae02b1844cbd62623e88e5dd5e7
It contains a simple PAX plugin that demonstrates the minimal requirements for launching PAX.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
The following changes should only take effect when the
adsPax
feature is enabled_googlesitekitPAXConfig
authAccess.oauthTokenAccess.token
: The current user's OAuth access tokenlocale
: 2-letter locale identifier, ieen
,fr
,de
etc. Use existing Site Kit utils and helpers to obtain the locale and trim it to the 2 letter identifier.debuggingConfig.env
: The environment (defaultPROD
)dev
version, eg.<script async src="https://www.gstatic.com/pax/dev/pax_integrator.js"></script>
CONTEXT_ADMIN_SITEKIT
) via WordPress whenservices
required for the PAX application. The service functions themselves areasync
functions. These services (properties within saidservices
object) should be as follows:businessService
: Used to provide information about the account being set up in PAX, contains two properties:getBusinessInfo
: anasync
function that returns an object containing info about the site. The returned object from saidasync
function should return the following properties:businessName
: A string representation of the business/site name. Existing datastore selectors can be used to get the site name for this valuebusinessUrl
: The URL of the site. Existing Site Kit utils should be used to obtain this value as it is consistently obtained throughout the code basefixBusinessInfo
: Acts similar to acatch
scenario, where an error object may be returned. Seefix
property above inauthenticationService
for more info. (Does not seem to be required)conversionTrackingService
: Used to provide information about the supported conversion event types, used to inform the user during campaign setup. While we will eventually integrate with the Conversion Event Infrastructure work currently being identified, an empty labels object should be provided for now. Contains 1 property:getSupportedConversionLabels
: async function that should returns an an object containing an array of support conversion type labels. This should be defaulted to an empty array for now,{ conversionLabels: [] }
termsAndConditionsService
: required but not needed for our usenotify
- empty functionImplementation Brief
Google\Site_Kit\Modules\Ads
classModule_With_Assets
interface, and useModule_With_Assets_Trait
setup_assets
conditionally returning new assets according to ACScript_Data
assetgooglesitekit-ads-pax-config
Script
asset forgooglesitekit-ads-pax-integrator
–pax_integrator.js
depending ongooglesitekit-ads-pax-config
, andgooglesitekit-modules-data
register
method, hook into thegooglesitekit_inline_modules_data
and conditionally add$modules_data['ads']
holding an array with following items:supportedConversionEvents
with value of an empty array for now./modules/ads/pax/services.js
createPaxServices(registry)
businessService
nested object as defined in ACgetBusinessInfo: async( () => { businessName, businessUrl } )
- sourcebusinessName
fromgetSiteName
selector of thecore/info
datastore, andbusinessUrl
from thegetHomeURL
selector of the same datastore (be sure to make sure values are available/resolved before returning)fixBusinessInfo
: return{ retryReady: true }
conversionTrackingService
nested object with following property:getSupportedConversionLabels
: returns{ conversionLabels: string[] }
- with inner value sourced from module data (supportedConversionEvents
)termsAndConditionsService
notify
as defined in ACTest Coverage
Ads
classcreatePaxServices
QA Brief
ads-pax
, you should not see any inline JSadsModule
andadsPax
feature flagsads-pax
again, you should see only inline JS scripthttps://www.gstatic.com/pax/dev/pax_integrator.js
script includedChangelog entry
The text was updated successfully, but these errors were encountered: