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

Add new amp-analytics vendor: Keen #19360

Merged
merged 8 commits into from
Nov 20, 2018
Merged

Add new amp-analytics vendor: Keen #19360

merged 8 commits into from
Nov 20, 2018

Conversation

adamkasprowicz
Copy link
Contributor

related issue #19359

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@adamkasprowicz
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@torch2424
Copy link
Contributor

Hello! Thanks for making an intent to implement issue and opening a PR to add yourself! 😄

I noticed that you are still committing to the PR. Please mention me (@) whenever this is ready, and we can do a review.

Thank you!

@torch2424
Copy link
Contributor

Oh wait just realized you were just fixing tests and things, will review this now!

Copy link
Contributor

@torch2424 torch2424 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Waiting on @zhouyx response to get this merged in.

Also, went ahead and tested this, and everything looks fine 😄

screen shot 2018-11-16 at 4 16 24 pm

@@ -1101,7 +1147,7 @@
<amp-analytics type="teaanalytics" id="teaanalytics">
<script type="application/json">
{
"vars": {
"vars": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing these line endings for us! Didn't catch those last time.

'viewportHeight': '${viewportHeight}',
'viewportWidth': '${viewportWidth}',
},
'transport': {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhouyx Could you remind me about how the transport works ( especially what to check for image ? )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@torch2424 in our case transport called "image" wouldn't work, because we need to receive Post Body content in our API.
Some people want to track "clicks", so we need to rely on the BeaconAPI (to run requests in background).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamkasprowicz What about browsers that don't support BeaconAPI, do you want to fallback to using xhrpost?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhouyx yes, xhrpost also works for us - I changed the config value to True.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. LGTM

@torch2424
Copy link
Contributor

Everyone LGTM'd Merging 😄

Also, you probably want to also add yourself to our docs site for supported analytics vendors: https://github.com/ampproject/docs/tree/master/content/docs/analytics

Thanks for the PR!

@torch2424 torch2424 merged commit f49d24c into ampproject:master Nov 20, 2018
Enriqe pushed a commit to Enriqe/amphtml that referenced this pull request Nov 28, 2018
* add analytics vendor keen.io

* fix analytics lint for vendor keen

* fix comment for Keen tracking example code

* fix tests for keen analytics vendor

* vendor keen analytics custom request test

* fix custom test unhandled variable

* fix test variable ending

* use xhr transport if beacon API is not available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants