Skip to content

Discussion: Use google measurement protocol for ecommerce events (enhanced compatibility with HTTP Events API) #17

@agcty

Description

@agcty

Currently, the google managed component doesn't use the measurement protocol for tracking ecommerce events. However, it seems particularly useful for exactly that in server-side environments.

Current state

Right now, when using the HTTP Events API, the MC will return a few client fetch requests which you then have to manually execute on the client side, if you don't do that, the checkouts, etc won't be tracked.

Proposed solution

While you can definitely return the response object of the tracking call and forward it to the client, this seems a little sub-optimal as there is an actual API from Google that you can use for exactly this scenario (and only this scenario, the measurement protocol doesn't allow you to send pageviews for example). Instead of client.fetch, manager.fetch could be called with the ecommerce request payload. This would also be more resilient against ad blockers.

I know that a lot of other questions would have to be answered to assess if this is feasible. This issue is to identify what these are and to start a discussion about using the measurement protocol in general.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions