Calling Appcues.start() vs Appcues.identify()

There's often a bit of confusion over Appcues.start() and Appcues.identify(). Let's clarify.

Appcues.identify()

  • This function should be called on page load with a userId and some set of user properties that you want to target by. The properties that are sent to Appcues are what is used to determine if a user qualifies for some Appcues content.
  • This function automatically calls Appcues.start(). You should never have to follow an identify call with a start call. In other words, your Appcues code should NOT look like this:
  • Appcues.identify("user1234", { 
        isAdmin: false,
        created: 12344556677
    });
    Appcues.start();   // Overkill :)
    	
  • You can call this function multiple times per page to build up the properties on the user object if you're loading data asynchronously. For example:
    YourAPI.getUsersFavoriteColor(function(data) {
        Appcues.identify("user1234", {
            favoriteColor: data.color
        });
    });
    // Further down in your code.
    YourAPI.getUsersFavoriteSnack(function(data) {
        Appcues.identify("user1234", {
            favoriteSnack: data.snack   // Cheetos, right?
        });
    })
    	

    By the time both of those calls return, Appcues knows both the user's favorite color and snack. In the intermediate state, when one has returned and the other is still in the process of returning, Appcues will only know one of the two properties.

Appcues.start()

  • This function should be called when the user has already been identified once since the current page load, but you want Appcues to attempt to show new content. We'll consult the list of content and the current user properties and show content if the user qualifies.
  • The most common scenario where this applies is in "single-page apps" (i.e. apps using Backbone, Angular, Ember, etc). These apps only do a full page load once and afterwards all navigation occurs without full page loads. Due to this, calling Appcues.identify() once at page load in these apps should suffice. At any navigation change, Appcues.start() can be called and the previous set of user properties will be used.

Still need help? Contact Us Contact Us