SlideShare a Scribd company logo
1
Use the Engagement tracking
and Metrics APIs
to bring insights to your business
Day 1 - Tuesday Nov 3, 2015
2
In this session
Make the most of the fine-grained information available on
your customer behavior from SparkPost & Momentum
We’ll look at several ways to do that:
•  Via the Reporting User Interface
•  Via the APIs
•  Via Webhooks event feeds in
near real-time
3
OTHER
CHANNELS
Recipients
ISPs
YAHOO
GMAIL
OUTLOOK
AOL
Message flow
Generate Message Deliver
Analyze
Multichannel
Powerful
Templating
Big-Data
Triggered
Marketing
Automated
Delivery
Optimization
Adaptive
Email
Network
React in
Real-Time
User
Friendly UI
Big Data
Feed
Sender
Real-Time
Insight
Transmission
API
One API
Transactional
Messages
97.8%
Average
Deliverability
Opens
Clicks
Bounces
OOB bounces
Feedback Loop
messages
Reporting UI
Metrics &
per-event API
Webhooks
4
Example newsletter
Target segments?
•  Interested in
cats, dogs, or both
What type of
customer?
•  Loyalty card holder
bronze/silver/gold
Campaign timing?
Black Friday
5
Name your campaigns
Use the “campaign_id” attribute – shows up in the Summary chart
{	
  
	
  	
  	
  	
  "options":	
  {	
  
	
  	
  	
  	
  "open_tracking"	
  :	
  true,	
  
	
  	
  	
  	
  "click_tracking"	
  :	
  true,	
  
	
  	
  	
  	
  "transactional"	
  :	
  false	
  
	
  	
  },	
  
	
  	
  "campaign_id":	
  "Bulk	
  Pet	
  Food	
  Offers",	
  
	
  	
  "content"	
  :	
  {	
  
	
  	
  	
  	
  	
  	
  "from":	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  "name"	
  :	
  "Awesome	
  
Company","email":"steve@thetucks.com"	
  
	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  "subject"	
  :	
  "Test	
  SparkPost	
  Transmission",	
  
	
  	
  	
  	
  	
  	
  "reply_to"	
  :	
  "Awesome	
  Company",	
  
	
  	
  	
  	
  	
  	
  "text"	
  :	
  "Hi	
  {{first_name}}rnTest	
  email!r
nCongratulations,rn{{signature}}",	
  
	
  	
  	
  	
  	
  	
  "html"	
  :	
  "<strong>Hi	
  {{first_name}},</strong><p>Test	
  
email	
  from	
  <a	
  href="http://messagesystems.com">Message	
  
Systems</a></p><p>Congratulations!</p>{{signature}}"	
  
	
  	
  },	
  
	
  	
  	
  "recipients":	
  [	
  
	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  "address":	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  "name":	
  "Bob	
  Lumreeker",	
  
	
  	
  	
  	
  	
  	
  	
  	
  "email":	
  "bob.lumreeker@gmail.com"	
  
	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  "tags":	
  ["cats",	
  "dogs"],	
  
	
  	
  	
  	
  	
  	
  "metadata":	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  "MemberType":	
  "Gold"	
  
	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  "substitution_data":	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  "signature":"Your	
  friendly	
  Solution	
  Engineer",	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  "first_name":"Steve"	
  
	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  }	
  
	
  	
  ],	
  
	
  	
  "substitution_data":	
  {	
  
	
  	
  },	
  
	
  	
  "metadata":{	
  
	
  	
  	
  	
  	
  	
  "Sender":	
  "BlackFriday1",	
  
	
  	
  }	
  
}	
  
6
Name your content links
data-­‐msys-­‐linkname	
  custom attribute
https://www.sparkpost.com/api#/introduction/substitutions-reference/personalized-links
Max length of 63 characters (truncated if too long)
Link name incorporated into the click-tracked link, will be tracked in engagement events.
7
Named content links in Engagement report
https://support.sparkpost.com/customer/portal/articles/2035637?b_id=7411
8
Passing information through metadata and tags
Tags: A list of single-values
•  10 per recipient, max 100
system-wide
Metadata: key-value pairs
•  Recipient-level
•  Transmission-level
(tags + metadata) max 1000 bytes
https://www.sparkpost.com/api#/reference/recipient-lists
9
Pulling information using the API
•  Everything that’s visible
on the Reporting UI, you
can also get via the
Metrics API (and then
some) ...
•  The message_events
API endpoint gives
access to fine-grained
event information for up
to 10 days:
Campaign ID
Metadata
Tags
10
Demo time!
11
API endpoints are self-describing
https://api.sparkpost.com/api/v1/message-events/events/documentation
{	
  
	
  	
  "results":	
  [	
  
	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  "type":	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  "description":	
  "Type	
  of	
  event	
  this	
  record	
  describes",	
  
	
  	
  	
  	
  	
  	
  	
  	
  "sampleValue":	
  "bounce"	
  
	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  "bounce_class":	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  "description":	
  "Classification	
  code	
  for	
  a	
  given	
  message	
  (see	
  [Bounce	
  Classification	
  Codes](https://support.sparkpost.com/
customer/portal/articles/1929896))",	
  
	
  	
  	
  	
  	
  	
  	
  	
  "sampleValue":	
  "1"	
  
	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  "campaign_id":	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  "description":	
  "Campaign	
  of	
  which	
  this	
  message	
  was	
  a	
  part",	
  
	
  	
  	
  	
  	
  	
  	
  	
  "sampleValue":	
  "Example	
  Campaign	
  Name"	
  
	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  "customer_id":	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  "description":	
  "SparkPost-­‐customer	
  identifier	
  through	
  which	
  this	
  message	
  was	
  sent",	
  
	
  	
  	
  	
  	
  	
  	
  	
  "sampleValue":	
  "1"	
  
	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  "delv_method":	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  "description":	
  "Protocol	
  by	
  which	
  SparkPost	
  delivered	
  this	
  message",	
  
	
  	
  	
  	
  	
  	
  	
  	
  "sampleValue":	
  "esmtp"	
  
	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  "device_token":	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  "description":	
  "Token	
  of	
  the	
  device	
  /	
  application	
  targeted	
  by	
  this	
  PUSH	
  notification	
  message.	
  Applies	
  only	
  when	
  delv_method	
  is	
  
gcm	
  or	
  apn.",	
  
	
  	
  	
  	
  	
  	
  	
  	
  "sampleValue":	
  "45c19189783f867973f6e6a5cca60061ffe4fa77c547150563a1192fa9847f8a"	
  
	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  "error_code":	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  "description":	
  "Error	
  code	
  by	
  which	
  the	
  remote	
  server	
  described	
  a	
  failed	
  delivery	
  attempt",	
  
	
  	
  	
  	
  	
  	
  	
  	
  "sampleValue":	
  "554"	
  
	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  "ip_address":	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  "description":	
  "IP	
  address	
  of	
  the	
  host	
  to	
  which	
  SparkPost	
  delivered	
  this	
  message;	
  in	
  engagement	
  events,	
  the	
  IP	
  address	
  of	
  the	
  
host	
  where	
  the	
  HTTP	
  request	
  originated",	
  
	
  	
  	
  	
  	
  	
  	
  	
  "sampleValue":	
  "127.0.0.1"	
  
	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  "message_id":	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  "description":	
  "SparkPost-­‐cluster-­‐wide	
  unique	
  identifier	
  for	
  this	
  message",	
  
	
  	
  	
  	
  	
  	
  	
  	
  "sampleValue":	
  "0e0d94b7-­‐9085-­‐4e3c-­‐ab30-­‐e3f2cd9c273e"	
  
	
  	
  	
  	
  	
  	
  },	
  
12
Webhooks
•  Creating webhooks
­  Via the UI ..
­  or through API calls ..
­  Can have many
•  Security
­  https transport option
•  Authentication
­  Choose between None,
Basic, or OAUTH2
13
Demo time!
14
Webhooks best practice
•  Timing
­  60 second batches, or batch-size reached
•  Your receiver code must http ACK
­  Once you’ve committed the data
­  Otherwise SparkPost will keep trying
•  Check the Batch ID in the http header
X-­‐MessageSystems-­‐Batch-­‐ID:	
  77c2b630-­‐d712-­‐11e4-­‐9642-­‐efc2723b99c1	
  
User-­‐Agent:	
  SparkPost	
  
host:	
  ec2-­‐54-­‐154-­‐175-­‐157.eu-­‐west-­‐1.compute.amazonaws.com	
  
accept:	
  application/json	
  
content-­‐type:	
  application/json	
  
content-­‐length:	
  9658	
  
Connection:	
  keep-­‐alive	
  
15
Webhook event types
bounce
delivery
injection
spam_complaint
out_of_band
policy_rejection
delay
click
open
generation_failure
generation_rejection
list_unsubscribe
link_unsubscribe
relay_injection
relay_rejection
relay_delivery
relay_tempfail
relay_permfail
https://api.sparkpost.com/api/v1/webhooks/events/documentation for full details !!
16
Focus on list hygiene
Processing the following event types is important for
keeping your lists clean:
•  Bounce
•  Out-of-Band bounce
•  Spam Complaint
•  List Unsubscribe
•  Link Unsubscribe
These events automatically add the recipient to the
suppression list inside SparkPost, as a safety net
measure.
17
Customer code in the public-domain
Financial Times have published their code for both Transmission API
usage and Webhooks handling
18
Summary
We’ve seen how fine-grained information can be carried by
•  The campaign_id attribute
•  Named links in templates and transmissions
•  Metadata and tags
We’ve used that information via:
•  The Reporting UI
•  Via the SparkPost APIs
•  Via Webhooks near real-time event feeds
19
Thank you
Steve Tuck
solution engineer
mobile +44 7917 064055
email steve.tuck@sparkpost.com

More Related Content

PDF
Insight User Conference Bootcamp - Multi-Channel with SparkPost Elite
PDF
SparkPost Customer Success Stories
PDF
Insight User Conference Bootcamp - Advanced Templatization
PPTX
DevNet 1056 WIT Spark API and Chat Bot Workshop
PPTX
Using the GSMA OneAPI Gateway
PDF
INTERFACE by apidays 2023 - Refining Your API: The Last Mile of API Design, J...
PDF
SendGridDelivered_API_Workshop
PDF
API for Beginners
Insight User Conference Bootcamp - Multi-Channel with SparkPost Elite
SparkPost Customer Success Stories
Insight User Conference Bootcamp - Advanced Templatization
DevNet 1056 WIT Spark API and Chat Bot Workshop
Using the GSMA OneAPI Gateway
INTERFACE by apidays 2023 - Refining Your API: The Last Mile of API Design, J...
SendGridDelivered_API_Workshop
API for Beginners

Similar to Insight User Conference Bootcamp - Use the Engagement Tracking and Metrics APIs to Bring Insights to Your Business (20)

PDF
Discovering Public APIs and Public API Network with Postman
PDF
LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...
PDF
API Management: La Puerta de enlace (por Francisco Nieto)
PPTX
Coding 102 REST API Basics Using Spark
PDF
The ultimate api checklist by Blendr.io
PPTX
2022 APIsecure_Securing APIs with Open Standards
PPTX
Salesforce Streaming event - PushTopic and Generic Events
PDF
Consumer centric api design v0.4.0
PPTX
Sgd kunal
PDF
REST is not enough: Using Push Notifications to better support your mobile cl...
PDF
Treating APIs as Products: How to Apply Product Management Principles to Your...
PDF
AWS Lambda Hands-on: How to Create Phone Call Notifications in a Serverless W...
PDF
AWS Lambda Hands-on: How to Create Phone Call Notifications in a Serverless Way
PPTX
API-Driven Relationships: Building The Trans-Internet Express of the Future
PPTX
MongoDB.local Dallas 2019: Pissing Off IT and Delivery: A Tale of 2 ODS's
PDF
DEF CON 27 - JOSHUA MADDUX - api induced ssrf
PDF
APIs and Process automation at APIDays Global 2016
PDF
The Swisscom APi journey
PDF
Crafting Consumable APIs
PDF
Postman Galaxy Tour - Keynote Presentation
Discovering Public APIs and Public API Network with Postman
LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...
API Management: La Puerta de enlace (por Francisco Nieto)
Coding 102 REST API Basics Using Spark
The ultimate api checklist by Blendr.io
2022 APIsecure_Securing APIs with Open Standards
Salesforce Streaming event - PushTopic and Generic Events
Consumer centric api design v0.4.0
Sgd kunal
REST is not enough: Using Push Notifications to better support your mobile cl...
Treating APIs as Products: How to Apply Product Management Principles to Your...
AWS Lambda Hands-on: How to Create Phone Call Notifications in a Serverless W...
AWS Lambda Hands-on: How to Create Phone Call Notifications in a Serverless Way
API-Driven Relationships: Building The Trans-Internet Express of the Future
MongoDB.local Dallas 2019: Pissing Off IT and Delivery: A Tale of 2 ODS's
DEF CON 27 - JOSHUA MADDUX - api induced ssrf
APIs and Process automation at APIDays Global 2016
The Swisscom APi journey
Crafting Consumable APIs
Postman Galaxy Tour - Keynote Presentation
Ad

More from SparkPost (20)

PPTX
Unlocking Email’s Hidden Opportunities to Create a Competitive Advantage
PPTX
SparkPost Celebrates International Women's Day 2020
PDF
PMTA Success Story - J2 Martech
PDF
How Email and Your Culture Can Help Change the World
PDF
Brave New World: Everything you Wanted to Know About Deliverability Updates
PDF
PowerMTA Integration Experiences and Solutions
PDF
Get Ahead of the Game! Our Journey to Rebranding and Success
PDF
Beyond the Norm: Email and the Innovation Ethos
PDF
New features in PMTA 5.0
PDF
Product Roadmap 2019 PMTA Summit
PDF
At the Wheel: An Evolution Story for Email Strategists (and Cyclists)
PDF
Webinar: Retail Banking - Optimizing the Customer Deposit Lifecycle
PDF
SparkPost Celebrates Pride
PDF
How LendingTree is Growing Rapidly with Email and Customer Engagement
PDF
On-Premises and Cloud - Putting the Pieces Together
PDF
Trends and Insights for Interactive Email & Google AMP for Email
PDF
Scaling Your Product with Key Growth Surfaces
PDF
Segmenting Your Way to Smarter Sending
PDF
State of Transactional Email 2018 (Benchmark report)
PDF
GDPR Affects Email Worldwide
Unlocking Email’s Hidden Opportunities to Create a Competitive Advantage
SparkPost Celebrates International Women's Day 2020
PMTA Success Story - J2 Martech
How Email and Your Culture Can Help Change the World
Brave New World: Everything you Wanted to Know About Deliverability Updates
PowerMTA Integration Experiences and Solutions
Get Ahead of the Game! Our Journey to Rebranding and Success
Beyond the Norm: Email and the Innovation Ethos
New features in PMTA 5.0
Product Roadmap 2019 PMTA Summit
At the Wheel: An Evolution Story for Email Strategists (and Cyclists)
Webinar: Retail Banking - Optimizing the Customer Deposit Lifecycle
SparkPost Celebrates Pride
How LendingTree is Growing Rapidly with Email and Customer Engagement
On-Premises and Cloud - Putting the Pieces Together
Trends and Insights for Interactive Email & Google AMP for Email
Scaling Your Product with Key Growth Surfaces
Segmenting Your Way to Smarter Sending
State of Transactional Email 2018 (Benchmark report)
GDPR Affects Email Worldwide
Ad

Recently uploaded (20)

PDF
Designing Intelligence for the Shop Floor.pdf
PDF
CCleaner 6.39.11548 Crack 2025 License Key
PDF
AI Guide for Business Growth - Arna Softech
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PPTX
Computer Software - Technology and Livelihood Education
PDF
Visual explanation of Dijkstra's Algorithm using Python
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PDF
MCP Security Tutorial - Beginner to Advanced
PPTX
Introduction to Windows Operating System
PDF
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
PPTX
Tech Workshop Escape Room Tech Workshop
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
Time Tracking Features That Teams and Organizations Actually Need
PPTX
Trending Python Topics for Data Visualization in 2025
PPTX
GSA Content Generator Crack (2025 Latest)
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
Types of Token_ From Utility to Security.pdf
Designing Intelligence for the Shop Floor.pdf
CCleaner 6.39.11548 Crack 2025 License Key
AI Guide for Business Growth - Arna Softech
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
Computer Software - Technology and Livelihood Education
Visual explanation of Dijkstra's Algorithm using Python
Weekly report ppt - harsh dattuprasad patel.pptx
Monitoring Stack: Grafana, Loki & Promtail
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
MCP Security Tutorial - Beginner to Advanced
Introduction to Windows Operating System
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
Tech Workshop Escape Room Tech Workshop
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Time Tracking Features That Teams and Organizations Actually Need
Trending Python Topics for Data Visualization in 2025
GSA Content Generator Crack (2025 Latest)
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
iTop VPN Crack Latest Version Full Key 2025
Types of Token_ From Utility to Security.pdf

Insight User Conference Bootcamp - Use the Engagement Tracking and Metrics APIs to Bring Insights to Your Business

  • 1. 1 Use the Engagement tracking and Metrics APIs to bring insights to your business Day 1 - Tuesday Nov 3, 2015
  • 2. 2 In this session Make the most of the fine-grained information available on your customer behavior from SparkPost & Momentum We’ll look at several ways to do that: •  Via the Reporting User Interface •  Via the APIs •  Via Webhooks event feeds in near real-time
  • 3. 3 OTHER CHANNELS Recipients ISPs YAHOO GMAIL OUTLOOK AOL Message flow Generate Message Deliver Analyze Multichannel Powerful Templating Big-Data Triggered Marketing Automated Delivery Optimization Adaptive Email Network React in Real-Time User Friendly UI Big Data Feed Sender Real-Time Insight Transmission API One API Transactional Messages 97.8% Average Deliverability Opens Clicks Bounces OOB bounces Feedback Loop messages Reporting UI Metrics & per-event API Webhooks
  • 4. 4 Example newsletter Target segments? •  Interested in cats, dogs, or both What type of customer? •  Loyalty card holder bronze/silver/gold Campaign timing? Black Friday
  • 5. 5 Name your campaigns Use the “campaign_id” attribute – shows up in the Summary chart {          "options":  {          "open_tracking"  :  true,          "click_tracking"  :  true,          "transactional"  :  false      },      "campaign_id":  "Bulk  Pet  Food  Offers",      "content"  :  {              "from":  {                      "name"  :  "Awesome   Company","email":"steve@thetucks.com"              },              "subject"  :  "Test  SparkPost  Transmission",              "reply_to"  :  "Awesome  Company",              "text"  :  "Hi  {{first_name}}rnTest  email!r nCongratulations,rn{{signature}}",              "html"  :  "<strong>Hi  {{first_name}},</strong><p>Test   email  from  <a  href="http://messagesystems.com">Message   Systems</a></p><p>Congratulations!</p>{{signature}}"      },        "recipients":  [          {              "address":  {                  "name":  "Bob  Lumreeker",                  "email":  "bob.lumreeker@gmail.com"              },              "tags":  ["cats",  "dogs"],              "metadata":  {                              "MemberType":  "Gold"              },              "substitution_data":  {                      "signature":"Your  friendly  Solution  Engineer",                      "first_name":"Steve"              }          }      ],      "substitution_data":  {      },      "metadata":{              "Sender":  "BlackFriday1",      }   }  
  • 6. 6 Name your content links data-­‐msys-­‐linkname  custom attribute https://www.sparkpost.com/api#/introduction/substitutions-reference/personalized-links Max length of 63 characters (truncated if too long) Link name incorporated into the click-tracked link, will be tracked in engagement events.
  • 7. 7 Named content links in Engagement report https://support.sparkpost.com/customer/portal/articles/2035637?b_id=7411
  • 8. 8 Passing information through metadata and tags Tags: A list of single-values •  10 per recipient, max 100 system-wide Metadata: key-value pairs •  Recipient-level •  Transmission-level (tags + metadata) max 1000 bytes https://www.sparkpost.com/api#/reference/recipient-lists
  • 9. 9 Pulling information using the API •  Everything that’s visible on the Reporting UI, you can also get via the Metrics API (and then some) ... •  The message_events API endpoint gives access to fine-grained event information for up to 10 days: Campaign ID Metadata Tags
  • 11. 11 API endpoints are self-describing https://api.sparkpost.com/api/v1/message-events/events/documentation {      "results":  [          {              "type":  {                  "description":  "Type  of  event  this  record  describes",                  "sampleValue":  "bounce"              },              "bounce_class":  {                  "description":  "Classification  code  for  a  given  message  (see  [Bounce  Classification  Codes](https://support.sparkpost.com/ customer/portal/articles/1929896))",                  "sampleValue":  "1"              },              "campaign_id":  {                  "description":  "Campaign  of  which  this  message  was  a  part",                  "sampleValue":  "Example  Campaign  Name"              },              "customer_id":  {                  "description":  "SparkPost-­‐customer  identifier  through  which  this  message  was  sent",                  "sampleValue":  "1"              },              "delv_method":  {                  "description":  "Protocol  by  which  SparkPost  delivered  this  message",                  "sampleValue":  "esmtp"              },              "device_token":  {                  "description":  "Token  of  the  device  /  application  targeted  by  this  PUSH  notification  message.  Applies  only  when  delv_method  is   gcm  or  apn.",                  "sampleValue":  "45c19189783f867973f6e6a5cca60061ffe4fa77c547150563a1192fa9847f8a"              },              "error_code":  {                  "description":  "Error  code  by  which  the  remote  server  described  a  failed  delivery  attempt",                  "sampleValue":  "554"              },              "ip_address":  {                  "description":  "IP  address  of  the  host  to  which  SparkPost  delivered  this  message;  in  engagement  events,  the  IP  address  of  the   host  where  the  HTTP  request  originated",                  "sampleValue":  "127.0.0.1"              },              "message_id":  {                  "description":  "SparkPost-­‐cluster-­‐wide  unique  identifier  for  this  message",                  "sampleValue":  "0e0d94b7-­‐9085-­‐4e3c-­‐ab30-­‐e3f2cd9c273e"              },  
  • 12. 12 Webhooks •  Creating webhooks ­  Via the UI .. ­  or through API calls .. ­  Can have many •  Security ­  https transport option •  Authentication ­  Choose between None, Basic, or OAUTH2
  • 14. 14 Webhooks best practice •  Timing ­  60 second batches, or batch-size reached •  Your receiver code must http ACK ­  Once you’ve committed the data ­  Otherwise SparkPost will keep trying •  Check the Batch ID in the http header X-­‐MessageSystems-­‐Batch-­‐ID:  77c2b630-­‐d712-­‐11e4-­‐9642-­‐efc2723b99c1   User-­‐Agent:  SparkPost   host:  ec2-­‐54-­‐154-­‐175-­‐157.eu-­‐west-­‐1.compute.amazonaws.com   accept:  application/json   content-­‐type:  application/json   content-­‐length:  9658   Connection:  keep-­‐alive  
  • 16. 16 Focus on list hygiene Processing the following event types is important for keeping your lists clean: •  Bounce •  Out-of-Band bounce •  Spam Complaint •  List Unsubscribe •  Link Unsubscribe These events automatically add the recipient to the suppression list inside SparkPost, as a safety net measure.
  • 17. 17 Customer code in the public-domain Financial Times have published their code for both Transmission API usage and Webhooks handling
  • 18. 18 Summary We’ve seen how fine-grained information can be carried by •  The campaign_id attribute •  Named links in templates and transmissions •  Metadata and tags We’ve used that information via: •  The Reporting UI •  Via the SparkPost APIs •  Via Webhooks near real-time event feeds
  • 19. 19 Thank you Steve Tuck solution engineer mobile +44 7917 064055 email steve.tuck@sparkpost.com