-
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
amp-analytics Segment.com #1292
Comments
Reference for MixPanel HTTP API that requires base64 encoded string: KissMetrics API is much simpler and can use GET and parameters |
Segment seems like a very cool product and very in line with AMP's philosophy!
|
ive discussed with the Segment folks and they dont have any way plans to remove base64 or support dot notation in their GET API. So @cramforce ... if i added this to AMP via a PR would it be considered? |
Definite yes on base64. I don't completely follow what the dot notation is. |
We're using keen.io for analytics and we have a very similar issue. Keen.io API requires JSON and base64 encoded query parameter (or POST-body) https://keen.io/docs/api/#record-a-single-event. {
"requests": {
...
"page": "$(host)/3.0/projects/<id>/events/collection?data=base64(json(${data}))"
},
"vars": {
"data": {
"key": "value"
}
}
} |
Nvm the dot notation but ok ill work on something for base64 and post Andre
|
FYI: I spun off the request for supporting POST for JSON to #1798. |
#3630 implements this already :D |
I'm really keen to implement Segment.com's API for AMP-Analytics but am running into road blocks.
It's nice that we can support POST with sendBeacon or XHR but what would the point of POST be if you cant post data and just a URL?
https://segment.com/docs/libraries/pixel/
https://segment.com/docs/libraries/http/
My use-case for Segment is that I wouldnt have to write configs for other analytics tools and just rely on Segment's servers to send the data to the other linked analytics services. Very very very useful.
Some implementation of where #1162 was going would be appreciated but the main issues I see are
1.) Helpers to transform data. Like how clientId is used now, if we could run any or certain functions to transform data before sending it but specified in the configuration
Example:
2.) Support for Post Body Data. sendBeacon and XHR can do this, but whats more important is how the data is specified.
Suggestion:
3.) Expand it further by allowing custom headers as Segment and maybe others require basic auth headers. Only XHR could do this but still why not case for it, there are use-cases
The text was updated successfully, but these errors were encountered: