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

Create a method to return ad campaigns #699

Open
Tracked by #678
nima-karimi opened this issue Feb 24, 2023 · 1 comment
Open
Tracked by #678

Create a method to return ad campaigns #699

nima-karimi opened this issue Feb 24, 2023 · 1 comment
Labels
status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. type: enhancement The issue is a request for an enhancement.

Comments

@nima-karimi
Copy link
Collaborator

This issue is part of #678 for integrating with the Multichannel Marketing Dashboard released with WooCommerce 7.4.

The new marketing dashboard has a section dedicated to managing the marketing campaigns the user has created for their store. In the MVP version, they can only view their campaigns on that page. We need to prepare and return the following data about the campaigns to WooCommerce:

  • The unique identifier of the campaign
  • The name of the campaign
  • The URL where the user can edit/view the details of the campaign
  • The cost of the campaign (This can mean the spending budget associated with the campaign)
  • The type of the campaign (Currently, Pinterest has an "Automatic" and "Manual" campaign type when creating a new ad campaign, but we should confirm if these two have any major differences aside from the way they are created). Note that the Pinterest's Get campaign API documentation indicates there is only one type, which is "campaign".

Since the extension does not store any data for the ad campaigns locally, we need to implement connections to the API to retrieve the list of the ad campaigns (ideally with a caching mechanism to avoid repeated requests to the API). Pinterest provides the data we need about the ads through its adsreporting APIs:

https://developers.pinterest.com/docs/redoc/adsreporting/#tag/campaigns

The list of campaigns can be obtained from this API:

https://developers.pinterest.com/docs/redoc/adsreporting/#operation/ads_v3_get_advertiser_campaigns_handler_GET

The advertiser ID can be obtained from the extension settings with the key tracking_advertiser:

$advertiser_id = Pinterest_For_Woocommerce()::get_setting( 'tracking_advertiser' );
@nima-karimi nima-karimi added the type: enhancement The issue is a request for an enhancement. label Feb 24, 2023
@nima-karimi nima-karimi self-assigned this Feb 24, 2023
@nima-karimi nima-karimi removed their assignment May 5, 2023
@nima-karimi
Copy link
Collaborator Author

This issue has been blocked for a long time because of issues with the scope granted by Pinterest API auth (pcTzPy-vB-p2), so I'm moving it to the backlog.

@nima-karimi nima-karimi added the status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant