-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 support for Parsely analytics #1595
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. 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, please reply here (e.g.
|
@amontalenti has signed the CLA. |
CC @rudygalfi |
@msukmanowsky I think the CLA bot will require you to say "I signed it!" cc @jmadler |
@@ -41,6 +41,11 @@ export const ANALYTICS_CONFIG = { | |||
'scrollHeight': 'SCROLL_HEIGHT', | |||
'screenWidth': 'SCREEN_WIDTH', | |||
'screenHeight': 'SCREEN_HEIGHT' | |||
// TODO: Requested by Parse.ly | |||
// screenAvailWidth (screen.availWidth) |
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 think you can remove the first three items here. @rudygalfi has opened #1503.
cc @cramforce for the last item. I am not sure if/how we'll do the session stuff. I think it requires some kind of storage on the client side.
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.
FYI: #1668 adds the these three items. Not in yet, but close.
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.
These vars should be available now.
Forgot to mention: Also, if you guys would like, you can add an example of parsely to examples/analytics.amp.html |
@msukmanowsky Three of the variables you requested should make it in soon, so you may want to update this once those are in. |
cc @andreban |
Any updates on this? Please sync with HEAD and rebase. I think we are almost there. |
@msukmanowsky I think this is close. Could you take a fresh look at the comments, resolve and rebase? |
Apologies for the wait, going to have a look today @rudygalfi. |
@googlebot I signed it! |
@@ -60,6 +60,7 @@ when the document is first loaded, and each time an `<a>` tag is clicked: | |||
## <a name="attributes"></a>Attributes | |||
|
|||
- `type` This optional attribute can be specified to use one of the built-in analytics providers. Currently supported values for type are: | |||
- `parsely`: Adds support for Parsely. Configuration details can be found at [parsely.com/docs](http://parsely.com/docs/integration/partners/google-amp.html). |
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.
This list should be sorted alphabetically.
Also, do you mind squashing the commits into a single commit to prepare for merging? Thanks! |
@avimehta will do on squashing. Quick question for you and Parse.ly stores a visitor ID in a
The id attribute of that JSON object contains the current visitor ID assigned by Parse.ly upon a visitor's first visit. Is it possible for Apologies as I may have misunderstood something with respect to |
Publisher site case: AMP CDN case: AMP manages get/set of CID and will generate one. This CID will be unique per a combination of publisher origin (e.g. the nytimes.com part of cdn.ampproject.org/c/nytimes.com/...) and the You asked:
Would there be any issue with transmitting the whole JSON back and extracting the ID server-side? |
@rudygalfi perfect, thanks for the explanation. We should be able to work just fine with that. |
Meant to cc @cramforce on the above to get his take, but happy to hear it should work for you. @cramforce can you read over #1595 (comment) and let us know if it seems reasonable to you or if you have additional suggestions? |
That is exactly right. |
Regarding testing, I've created a local build with Anything we missed in our integration? |
Just running |
@cramforce you're seeing pixel requests to |
I wasn't checking your PR directly yet :) Just looked at the source. |
Gotcha. I'm not seeing any requests for chartbeat either fwiw. Only Google Analytics and comScore seem to be working. |
@rudygalfi @cramforce I think this is ready to go but feel a little uneasy about not being able to test/see actual pixels firing on that aforementioned example page. |
'parsely': { | ||
'requests': { | ||
'host': 'https://srv.pixel.parsely.com', | ||
'basePrefix': '${host}$/plogger/?' + |
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.
There is an extra $
after ${host}
I checked out your PR and discovered you had a typo in the URL. See above. With that fixed it looks good. Chartbeat also appears to work fine from here. |
Thanks @cramforce, fixed the string interpolation issues (there were more than the one, dumb on my part). I can now see the chartbeat pixel firing, but still not ours on http://localhost:8000/examples.build/analytics.amp.html. |
Strange. I patched your commit and here is the request I see: |
'xhrpost': false, | ||
'image': true | ||
} | ||
|
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.
nit: remove this empty line?
Thanks @avimehta. Turns out I didn't have the Chrome extension installed and so requests for AMP JS files weren't being redirected to localhost. Having a final look and will then ping you. |
Alright @avimehta @rudygalfi @cramforce, we're ready to go here, apologies for the delays! |
👍 LGTM |
@msukmanowsky there seems to be a lint error? Can you fix that? @rudygalfi will merge as soon as that is done. Thanks for the patience so far! lgtm otherwise. |
@avimehta good to go. |
Add support for Parsely analytics
See #1500 for additional information. This PR adds vendor configuration support for Parse.ly analytics.
Outstanding issues are the additional configuration variables we're requesting and the open discussions on client-side sessionization and engaged time implementations.