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

Snowplow v2 #26059

Merged
merged 6 commits into from
Dec 18, 2019
Merged

Snowplow v2 #26059

merged 6 commits into from
Dec 18, 2019

Conversation

colmsnowplow
Copy link
Contributor

This PR replaces #24261 (Existing changes in there and authorship preserved, refactor added and commit history cleaned up).

Proposed changes for a PR to ampproject/amphtml.

  • Added custom context functionality (to be manually entered as SD-JSONs, with a trailing comma)
  • Added default amp_id and amp_page_view contexts - sent with every event (related Iglu Central PR).
  • Added custom events.
  • Added page pings.
  • Added parsing of js-tracker cross-domain linker url value - if found, value is retained for the lifetime of amp-set cookie.
  • Added amp linker passing of amp client id to outgoing links.
  • Additional standard tracker protocol fields added.
  • ampdocurl used for url.
  • Domain Userid setting removed (inconsistent with js tracker).

@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@colmsnowplow
Copy link
Contributor Author

@googlebot I consent.

@colmsnowplow
Copy link
Contributor Author

Local gulp pr-check seems to fail with the below, but doesn't look to be anything to do with my changes.

✗ AssertionError: expected 'i-amphtml-element i-amphtml-layout-responsive i-amphtml-layout-size-defined i-amphtml-layout' to match /i-amphtml-hidden-by-media-query/

Let me know if anything needs fixing!

@colmsnowplow
Copy link
Contributor Author

@max-tgam I think we might need you to comment @googlebot I consent. on this one too - apologies for the extra step!

@max-tgam
Copy link
Contributor

@googlebot I consent.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@colmsnowplow
Copy link
Contributor Author

colmsnowplow commented Dec 17, 2019

@zhouyx Tagging you as the reviewer on the old PR (not sure who would be reviewer) :).

@zhouyx zhouyx requested review from zhouyx and removed request for lannka December 17, 2019 17:55
@colmsnowplow
Copy link
Contributor Author

Apologies for force-pushing after requesting review - I noticed that I forgot to cherry-pick and squash in a commit. Have given it another once-over and it's definitely ready for review now (and merge if no changes required). :)

Copy link
Contributor

@zhouyx zhouyx left a comment

Choose a reason for hiding this comment

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

Looks good, please note I only reviewed the structure of the config. Please make sure that you've tested the outgoing request thoroughly.

We are in the middle of migrating all vendor config from js file to json file. The idea is that the config doesn't need to be compiled into the amp-analytics.js, instead AMP can load them lazily. To proceed, please also check in a json version of the snowplow_v2.json file. If you have the local developing environment set up, you can use the provided gulp task to generate that file by running gulp generate-vendor-jsons.

Note we can help you generate the json file for you in a separate PR, but it would be difficult to sync if we need to rollback the change here. So still highly recommend that you submit the json file along with this PR. Thank you!

Please refer to #26050 for more information on the migration process.

},
'cookies': {
'enabled': true,
'cookieMaxAge': 1800,
Copy link
Contributor

Choose a reason for hiding this comment

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

To confirm, the cookeMaxAge unit is in second. It is the desired behavior to persist cookie for 30 mins?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah no actually I want default value of 1 yr. Thanks for catching, commit on the way to fix.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, in that case, you don't need to specify the value. The default value is 365 days.

@@ -1687,11 +1777,13 @@
</div>

<div class="logo"></div>
<h1 id="top">AMP Analytics</h1>
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: revert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad! Fixing.

<span id="test1" class="box" data-vars-title="Example request with element level overrides">
Click here to generate an event
</span>
<p>
Example of <a id="ext" data-vars-target-url="../" data-vars-element-id="home" data-vars-element-content="Internal Link" href="../">Internal Link</a>.
Copy link
Contributor

Choose a reason for hiding this comment

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

Cool, thanks for adding this to test linker feature

@@ -0,0 +1,89 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: 2019

@colmsnowplow
Copy link
Contributor Author

Thanks, done - note that I force added the JSON file due to the gitignore.

@zhouyx
Copy link
Contributor

zhouyx commented Dec 18, 2019

Thanks, done - note that I force added the JSON file due to the gitignore.

Thank you for responding so quickly : ) #26053 had just been merged this morning : )

Copy link
Contributor

@zhouyx zhouyx left a comment

Choose a reason for hiding this comment

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

LGTM

@zhouyx zhouyx merged commit 2aa23ed into ampproject:master Dec 18, 2019
@zhouyx
Copy link
Contributor

zhouyx commented Dec 18, 2019

@colmsnowplow PR merged. Thank you for the integration!

@colmsnowplow colmsnowplow deleted the snowplow-v2 branch June 15, 2021 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants