Anonymous messages
UpdatedYou can show in-app messages to anonymous visitors to your website and convert them to members of your audience by inviting them to create an account, become users, or making their first purchase.
This feature is in early access
We’re still actively working on anonymous in-app messages. If you have any questions, run into issues, or just want to tell us about your experience, please let us know. Your feedback helps us build a better product for you!
How it works
With anonymous in-app messages, you can show messages to people who visit your website but haven’t been identified—people who haven’t logged in, provided their email address, and so on. These messages specifically exclude people you’ve identified.
You can determine the pages where your message will appear, and any unidentified people who visit the page will see your message! That way you can show visitors a banner, pop-up, or even present them with a survey to learn what brought them to your website.
your website) a-->z{Is the person identified?} z-->|no|b z-.->|yes|x(Person does not see
anonymous message) b{Does person already have
an anonymous_id?} b-.->|no|c(Generate
anonymous_id
)
b-->|yes|d
c-->d{Is the person on a pagewith an in-app message?} d-->|yes|g{Has person reached
message frequency limit?} g-->|no|f(Person sees
anonymous message) d-.->|no|x g-.->|yes|x
For now, in-app messaging only works with our JavaScript sourceA source is a website or server that you want to capture data from—it’s a source of data! integration. It does not work with our mobile SDKs. We may support mobile devices later, but it’ll only work with your website for now.
Enable anonymous in-app messaging
Anonymous in-app messaging is a feature for our JavaScript sourceA source is a website or server that you want to capture data from—it’s a source of data! integration.
- If you haven’t set up our JavaScript integration, you’ll need to do that first.
- If you use our legacy JavaScript snippet, you’ll need to update to the new source SDK to use this feature.
To support anonymous messaging, you need to modify your JavaScript SDK configuration to include the anonymousInApp: true
flag. This flag tells us that you want to support anonymous in-app messages.
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e<analytics.methods.length;e++){var key=analytics.methods[e];analytics[key]=analytics.factory(key)}analytics.load=function(key,e){var t=document.createElement("script");t.type="text/javascript";t.async=!0;t.src="https://cdp.customer.io/v1/analytics-js/snippet/" + key + "/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n);analytics._writeKey=key;analytics._loadOptions=e};analytics.SNIPPET_VERSION="4.15.3";
analytics.load("YOUR_CDP_API_KEY", {
"integrations": {
"Customer.io In-App Plugin": {
siteId: "YOUR_JOURNEYS_SITE_ID",
anonymousInApp: true
}
}
});
analytics.page();
}}();
Show an anonymous message
Presenting anonymous in-app messages to your website visitors is easy! Unlike other messages, you don’t need to select your audience: we’ll show your message to all unidentified people on your website. However, you don’t want to over-message your audience, so you should use page rules to make sure that you only show messages on pages where they’re useful.
Give your message a Name and a Description, then click Next.
Set a Page Rule to determine where you want your message to show up.
Set a Frequency for your message. By default, a message will appear on every page an anonymous person visits that matches your Page Rules criteria until they dismiss it. But you should set a frequency to make sure that you don’t over-message your audience!
Create your message and then click Next. The editor is fairly easy to use, but here are a few tips to keep in mind:
- Use the Display setting to determine where your message appears.
- You can’t use liquidA syntax that supports variables, letting you personalize messages for your audience. For example, if you want to reference a person’s first name, you might use the variable
{{customer.first_name}}
. in your message because we don’t have any information about the person you’re messaging. They’re anonymous! - The goal for most anonymous messages is to identify your audience. Write your message with a call-to-action and maybe even a button that encourages people to sign up, create an account, or provide their email address.
Schedule your message. You need to determine when your message starts and ends.
Review your message and click Launch Anonymous Message.
Best Practices
- Because anonymous messages will go to everybody you haven’t identified yet, you may want to target your message to specific pages. You can set Page Rules to determine where your message will appear. You should also set a Frequency to make sure you don’t over-message your audience. You don’t want to annoy your visitors!
- Remember that your primary goal with anonymous messages is to get people to identify themselves, so your message should encourage them to sign up, create an account, enter their email address, and so on. You may want to add a button to your messages that takes people to a signup or login page.
- Style your message to match your website’s look and feel. Using your website’s styles, and making the message look like a native part of your website help your audience trust both your website and the messages you show your anonymous visitors.
Anonymous metrics: making sure your message is effective
When you show an anonymous message, we track two things:
- Views: The number of times anonymous visitors saw your message.
- Clicks: The number of times anonymous visitors clicked buttons in your message. For each button, we’ll track individual clicks.
You can use these metrics to determine how effective your message is. If you see a lot of views but few clicks, you might want to experiment with your message’s content, call to action, or button text.
FAQ
How do I know if I’m set up to send in-app messages?
If you’re not sure if you’re ready to send in-app messages, you can check your Customer.io JavaScript client. If your package includes Customer.io In-App Plugin
, you’re ready to send in-app messages.
<script>
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e<analytics.methods.length;e++){var key=analytics.methods[e];analytics[key]=analytics.factory(key)}analytics.load=function(key,e){var t=document.createElement("script");t.type="text/javascript";t.async=!0;t.src="https://cdp.customer.io/v1/analytics-js/snippet/" + key + "/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n);analytics._writeKey=key;analytics._loadOptions=e};analytics.SNIPPET_VERSION="4.15.3";
analytics.load(
"YOUR_WRITE_KEY",
{
"integrations": {
"Customer.io In-App Plugin": {
siteId: "YOUR_JOURNEYS_SITE_ID",
anonymousInApp: true
}
}
}
);
analytics.page();
}}();
</script>
What is an anonymous person?
An anonymous person is anybody you haven’t yet identified by ID or email address. In most cases, this means someone you can’t message—you can’t send them an email, an SMS, push notification, and so on because you don’t know them yet.
When someone visits your website for the first time, our JavaScript library assigns them an anonymous ID. This ID lets us track their activity on your site. You can see anonymous activity in the Activity Log, but you won’t see a “person” in your workspace.
When you formally identifyThe Customer.io operation that adds or updates a person. When you identify a person, Customer.io either adds a person if they don’t exist in your workspace, or updates them if they do. Before you identify someone (by their email address or an ID), you can track them anonymously. them by ID or email address, we:
- Create or update a profile for them in Customer.io. You’ll see them in the People section of your workspace.
- Merge their anonymous activity with the identified profile. This lets you do things like message people based on their anonymous activity after you identify them.
Your goal with anonymous messaging is to turn someone from an anonymous user into an identified person.
Where does my message appear?
When you set up your message, you can determine both:
- Which pages your message will appear on. These are called Page Rules.
- Where on the page your message will appear. These are called Display preferences.
If you don’t set Page Rules, your message will appear on every page containing our JavaScript SDK that people visit anonymously. That might be overwhelming for your visitors, so make sure you set page and frequency settings to make sure you don’t over-message your visitors.
By default, we display messages as modals in the center of your page. That might obstruct your content, so you can set Display preferences to move your message. For example, rather than a modal message that covers your content, you might want to move to an Overlay style message that appears in one of the corners of your page.
How many times will a user see my message?
A user will see your message on every page meeting your page rules until:
- You
identify
them. Once you identify a person, they’re no longer anonymous, and they won’t see your anonymous message. - They meet your frequency settings without dismissing it. Imagine that you set a Frequency setting of
2
. If a person sees your message once, they can see it again on another page. If they dismiss the message, they won’t see it again. If you want to show a message until your audience interacts with it, you can set the frequency to Show Always.
If a user has already seen your message but clears their browser cache, they’ll get a new anonymous_id
. We’ll treat this new ID as a new person, and they’ll see your message again.
visits website) a-->b{Is person anonymous?} b-.->|No, they've
been identified|c(Do not show
anonymous message) b-->|yes|d{Does the page match the
message's page rules?} d-.->|no|c d-->|yes|e{Has the person reached the
message's frequency limit?} e-.->|yes|c e-->|no|f(Display
anonymous message)