Amphtml: For Google Amp-analytics events not captured in report if eventValue is string

Created on 11 Apr 2017  路  6Comments  路  Source: ampproject/amphtml

Observation: When eventValue is string Google Analytics doesn't show that event in reports

Even though the network tabs display that analytics _collect_ ping is sent and is successful(200 OK), this event is not visible in Google analytics report.

On the same Google Analytics config, _scroll event_ which sends integer values is immediately visible in Google Analytics dashboard. _Social Interactions_ works fine too!

PS: I have also added some _custom dimensions_ for AMP. But they are all same for other triggers such as social, pageview and event.

How do we reproduce the issue?

Aptly modified samples from Adding Analytics to your AMP pages
specifically at outbound link tracking section

Soon

Most helpful comment

All 6 comments

I discovered two conflicting documentation in this regard

  1. Generic Analytics documentation-eventValue

Field Name | Protocol Parameter | Value Type | Default Value | Max Length | Supported Hit Types
------------ | -------------|------------ | -------------|------------ | -------------
eventValue | ev | integer| None | None | event

  1. AMP Specific Analytics documentation-eventValue

Value | Type | Required | Description
------------ | -------------|------------ | -------------
eventValue | string | no | _A numeric value associated with the event (e.g. 42). Defaults to 0._ :exclamation:
with string sample demonstrated here

You are correct, eventValue is an integer according to GA, so the amp-analytics docs and sample code need to be updated.

/to @bpaduch

Thanks @kschmidtdev for suggesting the use of eventLabel as a workaround for now.

cc @avimehta

Was this page helpful?
0 / 5 - 0 ratings