ESP - SparkPost

A guide to generating UUIDs with SparkPost

SparkPost offers substitution variables which allow users to pull in campaign and contact data. By using combinations of these variables, we can generate and pass unique identifiers (UUID) into the "key" parameters without the need for any javascript. For example:

{{email_id}}  pulls in your campaign’s unique email ID
{{message_id}}  pulls in your unique message ID

By combining these tags, we can successfully create dynamic UUIDs and our "key" parameter values would therefore look something like this:

<a href="{{email_id}}{{message_id}}...
<img src="{{email_id}}{{message_id}}...

NOTE: the same tags should be passed into the "key" parameter values of both the click and image URLs just like we've done above.