You might not have access to this feature!

This feature is only available on our premium and enterprise plans. [Talk to our team](mailto:premium@customer.io) about upgrading your plan.

# Anonymous messages

[PremiumThis feature is available for Premium plans.](/accounts-and-workspaces/plan-features/) [EnterpriseThis feature is available for Enterprise plans.](/accounts-and-workspaces/plan-features/)

You 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 make their first purchase.

## How it works[](#how-it-works)

With anonymous in-app messages, you can show messages to people who visit your website or use your app 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.

## Enable anonymous in-app messaging for your website[](#enable-anonymous-in-app-messaging-for-your-website)

Anonymous in-app messaging is a feature for our JavaScript sourceAn integration that feeds data *into* Customer.io—a *source* of data. integration.

*   If you haven’t set up our JavaScript integration, [you’ll need to do that first](/journeys/in-app-web/#javascript-snippet).
*   If you use our legacy JavaScript snippet, you’ll need to [update to the new source SDK](/integrations/data-in/connections/javascript/js-migration/#migrating-from-customerios-javascript-snippet) 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.

```javascript
!function(){var i="cioanalytics", analytics=(window[i]=window[i]||[]);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.setAttribute('data-global-customerio-analytics-key', i);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": {
                anonymousInApp: true
            }
        }
    });
    analytics.page();
}}();
```

## Enable anonymous in-app messaging for your app[](#enable-anonymous-in-app-messaging-for-your-app)

If you use our mobile SDKs, you don’t need to do anything special to enable anonymous in-app messaging. You just need to use (or upgrade to) a version of our SDK that supports anonymous in-app messaging.

Mobile SDK

Minimum required version

[iOS SDK v3 and later](/integrations/sdk/ios)

3.14

[Android SDK v4 and later](/integrations/sdk/android)

4.12

[React Native SDK v4 and later](/integrations/sdk/react-native)

4.11

[Flutter SDK v2 and later](/integrations/sdk/flutter)

2.9

[Expo SDK v2 and later](/integrations/sdk/expo)

2.8

## Show an anonymous message[](#show-an-anonymous-message)

Unlike other messages, you don’t need to select your audience for anonymous messages: we’ll show your message to all unidentified people who visit your website or use your app. 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.

1.  Go to *Anonymous* and click **Create anonymous message**.
    
    [![The anonymous page shows your active anonymous messages](https://docs.customer.io/images/anonymous-in-app-start.png)](#9b416851dbbe815b68b24b72e27f19b8-lightbox)
    
2.  Give your message a *Name* and a *Description*, then click **Next**.
    
3.  Set **Page Rules** to determine the pages where you want your message to appear. See [Page rules](/journeys/send-in-app-message/#page-rule) for more information.
    
4.  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!
    
    [![The targeting step of an anonymous in-app message showing page rules and frequency settings](https://docs.customer.io/images/anonymous-in-app-targeting-1.png)](#deaf9203614f7986ad86ca50e65f0f9c-lightbox)
    
5.  Set a **goal** and **conversion** criteria. By default, an anonymous visitor converts if they become an identified profile within one week of clicking a tracked response (e.g, a link or button) in an in-app message.
    
    [![Goal and conversion settings interface for anonymous in-app messages showing options to configure conversion criteria and time window](https://docs.customer.io/images/anonymous-in-app-goal-1.png)](#05aa7388d369aca7b081ab5370df249c-lightbox)
    
    You can optionally add conditions to the goal like people must perform an event or enter or leave a segment. You can also change the conversion time period as well as the criteria from “clicking” to “viewing” the message depending on your needs.
    
6.  [Create your message](/journeys/html-in-app/) and then click **Next**. 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}}`.](/using-liquid) 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.
    
    [![An in-app message set up with a button configured to take the user to a sign up page](https://docs.customer.io/images/anonymous-in-app-content.png)](#dfa2daf8e0bf929dc1907b3c9042b00f-lightbox)
    
7.  [Schedule your message](#scheduling-your-anonymous-message). You need to determine when your message starts and ends.
    
    [![Schedule your message's start and end dates](https://docs.customer.io/images/anonymous-in-app-review-3.png)](#7065c674ed0aeac751e755159d218c61-lightbox)
    
8.  Review your message and click **Launch anonymous message**.
    

### Best Practices[](#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 the look and feel of your website or app. This helps your audience trust both your messages and your website or app.

## Anonymous metrics: measure effectiveness[](#anonymous-metrics)

When you show an anonymous message, we track three things:

1.  **Views**: The number of times anonymous visitors saw your message.
2.  **Clicks**: The number of times anonymous visitors clicked buttons in your message. We track clicks for each button.
3.  **Converted**: The number of identified profiles that met your goal and conversion criteria. (If multiple anonymous IDs were merged into the same identified profile, that counts as one conversion.)

[![anonymous-inapp-metrics-1.png](https://docs.customer.io/images/anonymous-inapp-metrics-1.png)](#9da88a9cce6cce8611b09ebd097d6732-lightbox)

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[](#faq)

### How do I know if I’m set up to send in-app messages?[](#how-do-i-know-if-im-set-up-to-send-in-app-messages)

Go to [Settings > Workspace Settings > In-app](https://fly.customer.io/workspaces/last/settings/actions/in_app). If in-app messages are enabled, then you’re ready to go!

### What is an anonymous person?[](#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 or uses your app for the first time, we assign them an anonymous ID.

*   For our [JavaScript client](/integrations/data-in/connections/javascript/), this ID lets us track their activity on your site or app. You can see anonymous activity in the *Activity Log*, but you won’t see a “person” in your workspace.
*   For our [mobile SDKs](/integrations/sdk/), we won’t show anonymous activity in the activity log, but we can use their `screen` events to make sure we surface messages to people who visit the right screens in your app.

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?[](#where-does-my-message-appear)

When you set up your message, you can determine both:

1.  Which pages or screens your message will appear on. These are called **Page Rules**.
2.  Where on the page or screen your message will appear. These are called **Display** preferences.

If you *don’t* set **Page Rules**, your message will appear on every page on your website or mobile app. 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.

[![The targeting step of an anonymous in-app message showing page rules and frequency settings](https://docs.customer.io/images/anonymous-in-app-targeting.png)](#514c8fd17b52cf6a608223ca4048e29e-lightbox)

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.

[![display settings for an anonymous in-app message showing an overlay style message set up to display in the bottom-right of the screen](https://docs.customer.io/images/anonymous-in-app-display.png)](#def2e3e4d117d5571f378cad1b376255-lightbox)

### How many times will a user see my message?[](#how-many-times-will-a-user-see-my-message)

A user will see your message on every page meeting your page rules *until*:

1.  You `identify` them. Once you identify a person, they’re no longer anonymous, and they won’t see your anonymous message.
2.  They meet your frequency settings without dismissing the message. Imagine that you set a *Frequency* setting of `2`. If a person sees your message once, they can see it again on another page or screen in your app. 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, or you otherwise reset their anonymous ID in your app, they’ll get a new `anonymous_id`. We’ll treat this new ID as a new person, and they’ll see your message again.