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
Add Umeng+ analytics config #13099
Add Umeng+ analytics config #13099
Conversation
I had not change the |
@zhouyx thanks! |
'event': '${base}&_ename=${eventName}&_eprops=${eventProps}', | ||
}, | ||
'transport': { | ||
'beacon': false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To confirm that your server only support transport type image
. We recommend using beacon
, and AMP will handle switching to other transport method when browser doesn't support beacon
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not support beacon now and will support it later.
'eventName': '', | ||
'eventProps': '', | ||
}, | ||
'requests': { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm that you don't provide default trigger in your vendor config? even pageview
event?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I confirm,Because if there are multiple amp-analytics components with the same type on a page, the default pageview will be trigger multiple times. So we removed it. And let the users decide whether to use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds good to me as long as you document the usage clearly on your site : )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but please fix the example before we merge the PR. Thanks
examples/analytics-vendors.amp.html
Outdated
<script type="application/json"> | ||
{ | ||
"vars": { | ||
"siteid": "YOUR_SITEID" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was testing locally with your config here. I got error log.js:162 [AmpAnalytics umenganalytics] Analytics config could not be parsed. Is it in a valid JSON format? SyntaxError: Unexpected token � in JSON at position 47
I check it's because of _
here. I guess the _
here is not a standard underscore. Please fix it.
This is also why I suggest adding default trigger to your vendor config. Because it's just too common to misconfigure the json object 😢.
Please fix the example here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it, and added the defaultPageview trigger.
Please rebase to fix the integration test, so that I can go ahead and merge this. Thanks. |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
@gzgogo Please try
|
CLAs look good, thanks! |
* repair master * ut * update ut * update ut
* repair master * ut * update ut * update ut
* repair master * ut * update ut * update ut
* repair master * ut * update ut * update ut
#13049