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

Remove UA from internal tracking #9042

Closed
7 tasks
aaemnnosttv opened this issue Jul 18, 2024 · 2 comments
Closed
7 tasks

Remove UA from internal tracking #9042

aaemnnosttv opened this issue Jul 18, 2024 · 2 comments
Labels
P1 Medium priority Team S Issues for Squad 1 Type: Infrastructure Engineering infrastructure & tooling

Comments

@aaemnnosttv
Copy link
Collaborator

aaemnnosttv commented Jul 18, 2024

Feature Description

Universal Analytics has stopped tracking all hits since July 1 2024, it can now be removed from the plugin.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The tracking configuration specific to UA should be removed
  • The tracking ID should be updated in \Google\Site_Kit\Core\Tracking\Tracking
    • trackingID_GA4 can be removed / replaced with the above (as it was before there were multiple IDs)

Implementation Brief

  • Update the TRACKING_ID const at includes/Core/Tracking/Tracking.php and replace the value with that of the GA4 tracking ID
  • In assets/js/util/tracking/createInitializeSnippet.js
    • Remove the dataLayerPush code block referencing config.trackingID
      dataLayerPush( 'config', config.trackingID, {
      groups: 'site_kit',
      send_page_view: config.isSiteKitScreen,
      dimension1: referenceSiteURL,
      dimension2: userRolesAsString,
      dimension3: userIDHash,
      dimension4: pluginVersion || '',
      dimension5: Array.from( enabledFeatures ).join( ',' ),
      dimension6: activeModules.join( ',' ),
      dimension7: isAuthenticated ? '1' : '0',
      } );
    • Update the dataLayerPush code block referencing config.trackingID_GA4 and update it to instead reference config.trackingID
      dataLayerPush( 'config', config.trackingID_GA4, {
      groups: 'site_kit',
      send_page_view: config.isSiteKitScreen,
      domain: referenceSiteURL,
      plugin_version: pluginVersion || '',
      enabled_features: Array.from( enabledFeatures ).join( ',' ),
      active_modules: activeModules.join( ',' ),
      authenticated: isAuthenticated ? '1' : '0',
      user_properties: {
      user_roles: userRolesAsString,
      user_identifier: userIDHash,
      },
      } );
  • In assets/js/util/tracking/index.js
    • Remove trackingID_GA4 from the initialConfig object
      const initialConfig = {
      activeModules,
      trackingEnabled,
      trackingID,
      trackingID_GA4: 'G-EQDN3BWDSD',
      referenceSiteURL,
      userIDHash,
      isSiteKitScreen,
      userRoles,
      isAuthenticated,
      pluginVersion,
      };

Test Coverage

QA Brief

  • Setup Site Kit
  • Enable Analytics event tracking debugger extension (like adswerve, etc) in the browser of your choice
  • Opt in for tracking in Site Kit Settings
  • Verify (in analytics debugger output) that UA tag ID is not present (UA-xxx), but only the GA4 one G-xxx

Changelog entry

  • Remove UA Analytics tracking from Site Kit admin.
@aaemnnosttv aaemnnosttv added P1 Medium priority Type: Infrastructure Engineering infrastructure & tooling labels Jul 18, 2024
@binnieshah binnieshah added Next Up Issues to prioritize for definition Team S Issues for Squad 1 labels Jul 22, 2024
@10upsimon 10upsimon assigned 10upsimon and unassigned 10upsimon Jul 23, 2024
@eugene-manuilov eugene-manuilov self-assigned this Jul 24, 2024
@eugene-manuilov
Copy link
Collaborator

IB ✔️

@eugene-manuilov eugene-manuilov removed their assignment Jul 24, 2024
@binnieshah binnieshah added Next Up Issues to prioritize for definition and removed Next Up Issues to prioritize for definition labels Jul 26, 2024
@zutigrm zutigrm self-assigned this Aug 7, 2024
@zutigrm zutigrm removed their assignment Aug 7, 2024
@tofumatt tofumatt assigned tofumatt and zutigrm and unassigned tofumatt Aug 7, 2024
@zutigrm zutigrm assigned tofumatt and unassigned zutigrm Aug 8, 2024
@tofumatt tofumatt removed their assignment Aug 8, 2024
@mohitwp
Copy link
Collaborator

mohitwp commented Aug 14, 2024

QA Update ✅

  • Tested on dev environment.
  • Tested using GA debugger.
  • Verified on dev environment that UA tag ID is not present (UA-xxx).
  • Verified that GA tag is showing.

Latest Environment -

image

image

Dev environment -

image

Screencast -

Recording.1300.mp4

@mohitwp mohitwp removed their assignment Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Medium priority Team S Issues for Squad 1 Type: Infrastructure Engineering infrastructure & tooling
Projects
None yet
Development

No branches or pull requests

7 participants