Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.

Add Documentation for open and click tracking (ses) using own subdomain #31

Closed
etenzy opened this issue Mar 18, 2020 · 3 comments
Closed

Comments

@etenzy
Copy link

etenzy commented Mar 18, 2020

With Amazon SES you can fairly easy define your own subdomain for open and click tracking...
Since Amazon advices you to use a CDN such as Amazon CloudFront (cloudflare works as well) you can archive this functionality also with nginx...

The just need to configure a nginx host as proxy for your desired AWS tracking domain!

AWS tracking domains

AWS Region AWS tracking domain
US East (N. Virginia) r.us-east-1.awstrack.me
US West (Oregon) r.us-west-2.awstrack.me
Asia Pacific (Mumbai) r.ap-south-1.awstrack.me
Asia Pacific (Sydney) r.ap-southeast-2.awstrack.me
Europe (Frankfurt) r.eu-central-1.awstrack.me
Europe (Ireland) r.eu-west-1.awstrack.me

NGINX config

location / {
    proxy_pass https://[AWS tracking domain];
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

Please note: Your host must be configured for ssl!

@freekmurze
Copy link
Member

That's pretty cool! Could you send a PR with this info to https://github.com/spatie/laravel-mailcoach-docs

Please be as detailed as you can. The docs are being read by people that have no experience with AWS at all, so you'll need to hold their hand (be very specific on which screen which specific fields need to be filled in).

Thanks!

@rromanchuk
Copy link

@etenzy I would have never thought to use my existing custom origin, this is a million times more clear than their own documentation. for CF with custom cname, i was confused about how i was supposed to route the request, docs are super ambiguous. I was thinking maybe they left out, but were implying using s3 static site as origin with redirect.

Do you have any details/debugging info around the r.[region].awstrack.me? Instead of creating a new distribution, i'd like to consolidate, but I don't have any details about the path to be able route to my custom origin. Also, do you know if they pass any headers/params on the redirect?

@podcasthosting
Copy link

This stopped working for us from the last time we sent a newsletter. Now we get some other´s service error page and weired error messages. It seems AWS changed something on there end and cannot resolve the requested domain.

Could anyone solve this, yet?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants