US English (US)
ES Spanish

Submit Article Requests

Do you have a suggestion for an article you would like to see created?
Feel free to submit this form and add your suggestions to our document board.

Please fill out the contact form below and we will reply as soon as possible.

  • Integration Hub
  • Contact Us
English (US)
US English (US)
ES Spanish
  • Docs home
  • Web Experiences
  • Targeting and Triggering

Advanced Targeting Techniques

Use custom properties and JavaScript to target by time of day, language, IP address, geolocation, or scroll position.

Updated at March 30th, 2026

Submit Article Requests

Do you have a suggestion for an article you would like to see created?
Feel free to submit this form and add your suggestions to our document board.

Please fill out the contact form with the details about the help content you'd like to see.

  • Home

  • Getting Started

    • Installation & Developers

      • Web Experiences

        • Mobile Experiences

          • Workflows

            • Analytics & Data

              • Account Management

                • Best Practices

                  • Integrations

                    Table of Contents

                    Target by time of day or date Show a Flow only during business hours (9 AM – 5 PM) Show a Flow only during a specific month Show a Flow only in the last week of the month Target by language (localization) Approach 1: One Flow per language Approach 2: One Flow with HTML blocks Target by IP address Target by geolocation Trigger a Flow on scroll

                    These techniques go beyond the standard page and audience targeting UI. Most require adding a small JavaScript snippet to your app so that custom properties are sent to Appcues via the Appcues.identify() call.

                    Target by time of day or date

                    Send the user's local time as custom properties so you can restrict experiences to business hours, specific months, or days of the month.

                    Add this snippet after the user logs in:

                    const now = new Date();
                    
                    Appcues.identify('USER_ID', {
                      currentDayOfWeek: now.getDay(),    // 0 = Sunday, 6 = Saturday
                      currentDayOfMonth: now.getDate(),  // 1–31
                      currentHour: now.getHours(),       // 0–23
                      currentMonth: now.getMonth()       // 0 = January, 11 = December
                    });
                    

                    Show a Flow only during business hours (9 AM – 5 PM)

                    In the experience's Audience section, add two conditions with All:

                    • currentHour is greater than 8
                    • currentHour is less than 17

                    Show a Flow only during a specific month

                    • currentMonth equals 0 (January)

                    Show a Flow only in the last week of the month

                    • currentDayOfMonth is greater than 24

                    Alternative for date-based scheduling: If you want an experience to start and stop on specific calendar dates without code, use the Schedule feature instead.

                    Target by language (localization)

                    There are two approaches depending on how many languages you support.

                    Approach 1: One Flow per language

                    Best for a small number of languages.

                    1. Build your Flow in a base language.
                    2. Clone the Flow for each additional language. Rename each clone (e.g., "Welcome Tour — French").
                    3. Translate the content in each clone.
                    4. Add a Language condition to each Flow's audience targeting, selecting the matching language.

                    You can target a broad language (e.g., "Chinese (all)") or a specific dialect (e.g., "Chinese — Hong Kong"). To target multiple dialects, add them as separate conditions with Any logic.

                    Approach 2: One Flow with HTML blocks

                    Best when you're comfortable with HTML and want fewer Flows to manage.

                    Use Advanced > HTML blocks instead of text blocks. Inside each block, add a <div> per language with a CSS class that controls visibility based on the user's browser language:

                    <div class="lang en">Show in English.</div>
                    <div class="lang fr">Afficher en français.</div>
                    <div class="lang de">Auf Deutsch anzeigen.</div>
                    
                    <style>
                      .lang { display: none; }
                      .lang.{{_lastBrowserLanguage}} { display: block; }
                    </style>
                    

                    Only the <div> matching the user's browser language will appear.

                    Fallback for unlisted languages: Add the class names of all unspecified languages to your default block so it shows for any language you haven't explicitly translated.

                    Using a custom language property: If your app tracks language separately from the browser, send it as a property via Appcues.identify() and reference that property name in the CSS instead of {{_lastBrowserLanguage}}.

                    Target by IP address

                    Appcues doesn't target by IP address natively, but you can send the user's IP as a custom property.

                    Use the Appcues IP endpoint to fetch the user's IP and pass it in the identify call:

                    fetch('https://api.appcues.net/v1/remote_ip')
                      .then(response => response.json())
                      .then(json => {
                        Appcues.identify('USER_ID', {
                          ip: json.remote_ip,
                          // ...other properties
                        });
                      });
                    

                    Once the ip property is populated, you can use comparators like starts with or contains to target IP ranges in your audience conditions.

                    Blocking a user or IP: There's no built-in block feature. Use audience targeting with a "doesn't equal" or "doesn't contain" condition on the ip property to exclude specific addresses.

                    Target by geolocation

                    If your users have enabled browser geolocation, you can pass their coordinates to Appcues and target by geographic area.

                    Geolocation requires user permission. Test your implementation for cases where the user has and has not enabled it. The geolocation call can also time out — confirm the location data exists before passing it.

                    function setLocationProperties() {
                      if (!navigator.geolocation) return;
                    
                      navigator.geolocation.getCurrentPosition(position => {
                        Appcues.identify('USER_ID', {
                          currentLatitude: position.coords.latitude,
                          currentLongitude: position.coords.longitude
                        });
                      });
                    }
                    
                    setLocationProperties();
                    

                    To target a geographic area, define a bounding box using "greater than" and "less than" on both latitude and longitude. Use latlong.net to find coordinates.

                    Example targeting a region around Boston (42.36, -71.06):

                    • currentLatitude is greater than 42.36 AND is less than 42.37
                    • currentLongitude is greater than -71.07 AND is less than -71.05

                    Trigger a Flow on scroll

                    Use the Appcues.show() JavaScript call to display a Flow when a user scrolls past a threshold.

                    This requires adding code to your application. Appcues.show() bypasses all targeting rules — the Flow will show regardless of audience, frequency, or page targeting.

                    let shown = false;
                    
                    window.addEventListener('scroll', () => {
                      if (shown) return;
                    
                      const scrollPercent = (window.scrollY + window.innerHeight) / document.body.scrollHeight;
                    
                      if (scrollPercent > 0.75) {
                        shown = true;
                        Appcues.show('FLOW_ID');
                      }
                    });
                    

                    Replace FLOW_ID with the ID of the Flow you want to trigger. You can find the Flow ID on its settings page URL in Studio.

                    Important: Since Appcues.show() ignores targeting, a "show once" Flow can appear multiple times, and users outside your intended audience will still see it. Set the Flow's trigger to Show manually so it doesn't also fire on page load.

                    If you need to swap this Flow out later, your developers will need to update the snippet with the new Flow ID.

                    corner cases use cases scroll hour month translate localize new users ip address location geolocation

                    Was this article helpful?

                    Yes
                    No
                    Give feedback about this article

                    Related Articles

                    • Create a Flow
                    • Target by User & Group Property
                    Appcues logo

                    Product

                    Why Appcues How it works Integrations Security Pricing What's new

                    Use cases

                    Appcues Integration Hub User Onboarding Software Feature Adoption Software NPS & Surveys Announcements Insights Mobile Adoption

                    Company

                    About
                    Careers

                    Support

                    Developer Docs Contact

                    Resources

                    The Appcues Blog Product Adoption Academy GoodUX Case studies Webinar Series Made with Appcues

                    Follow us

                    Facebook icon Twitter icon grey Linkedin icon Instagram icon
                    © 2022 Appcues. All rights reserved.
                    Security Terms of Service Privacy Policy

                    Knowledge Base Software powered by Helpjuice

                    Expand