-
-
Notifications
You must be signed in to change notification settings - Fork 305
Links
David García edited this page Apr 28, 2016
·
3 revisions
Links handles email campaign statistics tracking
Links is the service in charge of modifying the campaign body, so that statistics on email opens and clicks can be collected, and also provides endpoints to gather that data.
-
campaigns
: it sends an SNS notification with a campaign that needs to be sent, so that the body links can be parsed.
It’ll have four lambda functions:
-
parseLinks
: it modifies the body of the campaign, appending opens tracking pixel and parsing and storing all the links data. The links URL's will be replaced by another ones that point to our API. -
forwardLink
: whenever a recipient clicks on any of the email links, he'll be directed to this function, which actually sends a SNS message to theIncrementClickCount
topic and forwards the user to the actual URL. -
incrementClickCount
: increments the counter of clicks of a given link. -
incrementOpensCount
: function triggered by the opens tracking pixel, which increments the opens count.
This service publishes and reads messages from the following SNS topics:
SendCampaign
IncrementClickCount
{
"userId": "...",
"sender": {
"region": "...",
"apiKey": "...",
"apiSecret": "...",
"ratePerSecond": "...",
"emailAddress": "...",
"fromName": "..."
},
"campaign": {
"id": "...",
"body": "...",
"subject": "...",
"senderId": "...",
"listIds": ["listId1", "listId2", "..." ],
"precompiled": "true|false"
},
"recipientsCount": "..."
}
-
parseLinks
adds the pixel image for opens tracking and parses the links in the campaign body, stores them in the database and pushes a SNS message to theAttachRecipients
topic. The latter message includes the parsed body and theprecompiled
flag is set totrue
.