Skip to content

Add E2E tests for Enhanced Conversions data collection during WooCommerce purchases #12012

@hussain-t

Description

@hussain-t

Feature Description

Add comprehensive E2E test coverage for Enhanced Conversions data sending when users complete purchases through WooCommerce. This will ensure that user data (email, phone, first name, last name, address) is properly collected and normalized on the server, and then sent via gtag( 'event', 'purchase', { user_data: {...} } ) during WooCommerce checkout completion events.

The tests should verify that ECEE functionality works correctly for both logged-in and guest users making purchases through WooCommerce, ensuring proper integration with WooCommerce's PHP-based data extraction (from WC_Order) and JavaScript event tracking for data transmission to Google Ads.


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

Acceptance criteria

  • E2E tests verify ECEE data collection and transmission for WooCommerce purchases.
  • Tests cover both logged-in users and guest checkout scenarios.
  • Tests verify proper data formatting and normalization of user data.
  • Tests confirm gtag( 'event', 'purchase' ) is called with correct user_data parameters.
  • Tests verify Enhanced Conversions only function when gtagUserData is enabled.
  • Tests validate that data is collected from WooCommerce purchase completion events.
  • Tests ensure no data is sent when the gtagUserData feature flag is disabled.

Implementation Brief

Test Coverage

QA Brief

Changelog entry

Metadata

Metadata

Assignees

Labels

P2Low priorityTeam MIssues for Squad 2Type: EnhancementImprovement of an existing feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions