forked from sendgrid/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategories.html
More file actions
58 lines (47 loc) · 1.81 KB
/
Copy pathcategories.html
File metadata and controls
58 lines (47 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
layout: page
weight: 0
title: Categories
navigation:
show: true
---
<p>Categories help organize your email analytics by enabling you to tag emails by type.</p>
<p>Just as you can view the statistics on all your activity under the '<a href="{{root_url}}/Delivery_Metrics/">Statistics</a>' tab, you can go a step further and view the statistics on a particular category.</p>
<p>The events that can be associated with category include:</p>
<ul>
<li>Emails sent</li>
<li>Clicks</li>
<li>Opens</li>
<li>Bounces</li>
<li>Spam Reports</li>
<li>Unsubscribes</li>
</ul>
<p>The actual statistics included vary depending upon the set of enabled <a href="{{root_url}}/Apps/">Apps</a>. Emails sent, bounces and spam reports will always get tracked. Unsubscribes, Clicks, and Opens require that the associated App is enabled.</p>
{% warning %}
Categories must be in 7bit encoding using the US-ASCII character set.
{% endwarning %}
{% info %}
Currently, there is no limit to the number of categories you can track.
{% endinfo %}
{% info %}
Categories should be used to group messages together. If you need to attach unique data or identifiers to a message, use Unique Arguments instead.
{% endinfo %}
{% anchor h2 %}
Example
{% endanchor %}
<p>You can use SendGrid's <a href="{{root_url}}/API_Reference/SMTP_API/">SMTPAPI</a> to add these categories to your email. The following should be added to the email's header:</p>
{% codeblock lang:json %}{
"category": "Example Category"
}
{% endcodeblock %}
<p>In this example, SendGrid would associate statistics for the email containing that header with the category <strong>Example Category</strong>.</p>
<p>You can assign multiple categories per message, up to 10:</p>
{% codeblock lang:json %}{
"category": [
"dogs",
"animals",
"pets",
"mammals"
]
}
{% endcodeblock %}