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

Send the related tracking event with the account ID to be connected when connecting to an existing Google Merchant Center or Google Ads account #2201

Merged
merged 2 commits into from
Jan 24, 2024

Conversation

eason9487
Copy link
Member

Changes proposed in this Pull Request:

It's a follow-up PR for #2199 (comment).

This PR adds the account ID to be connected to the properties of the gla_mc_account_connect_button_click and gla_ads_account_connect_button_click events.

Screenshots:

📹 Connect Google Merchant Center account

Kapture.2024-01-18.at.11.10.19.mp4

📹 Connect Google Ads account

Kapture.2024-01-18.at.11.05.33.mp4

Detailed test instructions:

  1. Enable tracking debug tool
    • Open the Console tab of the browser DevTool.
    • Change the filter level to "All levels".
    • Run localStorage.setItem( 'debug', 'wc-admin:*' ) and refresh the page to make it work.
    • It should be able to view tracking via the Console tab. Ref:
      1
  2. Disconnect Google Merchant Center and Google Ads accounts if already connected.
  3. Go to the first step of onboarding flow.
  4. Connect to an existing Google Merchant Center account and check if the gla_mc_account_connect_button_click event properties have the id and if its value is correct.
  5. Proceed to the last step of onboarding flow.
  6. Connect to an existing Google Ads account and check if the gla_ads_account_connect_button_click event properties have the id and if its value is correct.

Changelog entry

Add - Send the related tracking event with the account ID to be connected when connecting to an existing Google Merchant Center or Google Ads account.

…ccount_connect_button_click` and `gla_ads_account_connect_button_click ` events.
@eason9487 eason9487 requested a review from a team January 18, 2024 03:34
@eason9487 eason9487 self-assigned this Jan 18, 2024
@github-actions github-actions bot added changelog: add A new feature, function, or functionality was added. type: enhancement The issue is a request for an enhancement. labels Jan 18, 2024
Copy link
Contributor

@jorgemd24 jorgemd24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @eason9487, thanks for this adjustment. I followed the steps that you mentioned in the PR and everything works well, however, I have a doubt before approving this PR, why do we use id as an event property instead of their respective names, for example: gla_ads_id and gla_mc_id ?

@eason9487
Copy link
Member Author

Thanks for the review, @jorgemd24

why do we use id as an event property instead of their respective names, for example: gla_ads_id and gla_mc_id?

The gla_mc_id property is only included when there is a connected Google Merchant Center account, and the same goes for gla_ads_id and Google Ads account.

At the moment the "Connect" button is clicked, the account is not yet connected, so id is used to indicate the account ID to be connected and to distinguish it from gla_mc_id or gla_ads_id.

@eason9487 eason9487 requested a review from jorgemd24 January 19, 2024 02:47
Copy link
Contributor

@jorgemd24 jorgemd24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @eason9487 for the clarification, so it's just a "way" to distinguish between connected and not connected. I guess we will be able to tell which type of id is (ads or mc) by checking the event name. I am approving the PR as it works as expected and the doubt that I had about the event property name has been clarified.

@eason9487
Copy link
Member Author

so it's just a "way" to distinguish between connected and not connected. I guess we will be able to tell which type of id is (ads or mc) by checking the event name.

Yes, like many other events, they may have the same event property name, but each property's meaning needs to be interpreted along with its event name or somewhat context.

Base automatically changed from add/pageview-base-properties-frontend-tracks to develop January 24, 2024 02:24
@eason9487 eason9487 merged commit 366c078 into develop Jan 24, 2024
7 checks passed
@eason9487 eason9487 deleted the add/connecting-account-id-frontend-tracks branch January 24, 2024 02:26
@jorgemd24 jorgemd24 mentioned this pull request Jan 30, 2024
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: add A new feature, function, or functionality was added. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants