Hi. I have a Snowplow deployment running on AWS. I believe this is the open source quick start version deployed using terraform.
It’s using http
Locally I have an html file with the contents of the ‘tracking events → page views’ javascript
the sp.js file is in the same folder.
I have my collector url set to http://MY_AWS_INSTALL.eu-central-1.elb.amazonaws.com/api
When I run the page and check the console I’m getting a CORS error.
Access to XMLHttpRequest at 'http://XXXXX.eu-central-1.elb.amazonaws.com/api/com.snowplowanalytics.snowplow/tp2' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
sp.js:7 POST http://XXXXX.eu-central-1.elb.amazonaws.com/api/com.snowplowanalytics.snowplow/tp2 net::ERR_FAILED
You don’t need /api at the end of your collector URL.
That suggests this is either your Iglu Server URL, or you’ve added /api to the end of your collector URL.
Try navigating to http://MY_AWS_INSTALL.eu-central-1.elb.amazonaws.com/health
If that returns OK, then set your collector URL to: http://MY_AWS_INSTALL.eu-central-1.elb.amazonaws.com
So that URL is for your Iglu Server (there is no health endpoint on that). Thats not where you need to send events, the Iglu Server is where your schemas are stored to be used by the pipeline.
You should have spun up two things during the quickstart, the Iglu Server and the Pipeline stacks.
The pipeline should have given you a collector url in its output. This is the URL you need to use for your tracking.
HI @PaulBoocock thanks for your help getting this setup.
My next challenge is connecting to Kinesis since we want to stream the data in real time.
These are the settings for our connector:
I think the only one of these you might be able to help with is the name given to the AWS stream. Not sure of the exact terminology here so I’ll have to do some digging.
So the Enriched Stream is the richest set of data. You’ll likely want to use one of our Analytics SDKs to parse the TSV into JSON: Analytics SDKs - Snowplow Docs