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.

  • Appcues Certifications & Training
  • Contact Us
  • Home
  • Installation & Developers
  • Installing Appcues

Installing with Google Tag Manager (Developer)

Updated at December 21st, 2022

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.

  • Installation & Developers
    Installing Appcues Installing Appcues Mobile API & Data Troubleshooting Extras
  • User Experiences
    Web Experiences Building Web Experiences Building Mobile Experiences Customization & Styling Targeting Studio Troubleshooting Use Cases FAQ
  • Mobile
    Installation & Overview Building Mobile Experiences Mobile Analytics Troubleshooting Mobile Use Cases
  • Account Management
    Subscription Users & Data
  • Analytics
    Experience and Event Analytics Data
  • Best Practices
    Use Cases Pro Tips PLG FAQ
  • Integrations
    Integration Documents Use Cases Resources
  • Post-mortem
    System Incidents
+ More

Table of Contents

Loading Appcues resources into the page Identifying your user to Appcues Optionally, add a tag for Appcues.group()

Using Google Tag Manager to install Appcues can be a quick and easy way to get started with Appcues without having to push any new code. Getting started is pretty easy. There are two to three things we need to get done:  

  1. Load the Appcues Javascript SDK into the page.
  2. Make sure Appcues.identify() is called.
  3. For single page applications, make sure Appcues.page() is called appropriately.
  4. Optionally, add a tag for Appcues.group().

Loading Appcues resources into the page

These first two items are pretty easy. The Appcues script should be loaded and Appcues.identify() should be called on every page load. We'll want to put the following line into a tag (substituting your own account id for <YOUR_ACCOUNT_ID>):

<script src="//fast.appcues.com/YOUR_ACCOUNT_ID.js"></script>

Identifying your user to Appcues

Appcues depends on the Appcues.identify() call to pass a user ID and other user properties when checking whether to show content on a page or not. You can add this call into another tag. If you're merely testing Appcues, you can always hard-code these values in, such as adding the following to Tag Manager:

<script>   
    Appcues.identify('testUserId', {userName: 'Test Testerson', email: 'test@test.com'});
</script>

This means that every user will have the same user ID and there won't be a way to differentiate between users, so, for a full implementation, you'll need to send over an actual user ID. Although a user ID is the only user information actually required for Appcues to work, it's also a good idea to send some additional user properties. To do this through Tag Manager, you'll need to leverage Tag Manager Variables (see here) and pass those into the identify call:

<script>   
    Appcues.identify(<USER_ID_VARIABLE>, {<USER_PROPERTY_VARIABLES>});
</script><>

For Single Page Applications you will need to add a call to Appcues.page() for any URL changes:

This means that when the URL changes without causing a full page load, Appcues will still know that the user is on a new page and should check for new content to show.

Optionally, add a tag for Appcues.group()

Group properties describe the account on which the user is currently active; things like company name, plan tier, and industry. This information is optional and can be sent using Appcues.group(). A user can belong to multiple groups, but only one group can be identified at a time. Only the group most recently associated with the user will be considered for targeting.

Similar to  Appcues.identify(), a unique group ID is required, and all the same formatting restrictions apply.

Example:

<script>
    Appcues.group("6789", {company_name: "Lendi Global",plan: "enterprise",employee_count: 12000,trial: false});
</script>

And that should do it! To test your installation after publishing, login to your site, open the browser console, and enter 

Appcues.debug()

This will give you some diagnostic feedback on how Appcues is setup and what data is being sent. Check out our debugging documentation for full details on this feature. And for more information on a standard installation of Appcues, check out our installation overview.

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Javascript API (Developer)
  • Appcues Installation Overview
  • User Properties Overview
  • Welcome and Getting Started
Appcues logo

Product

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

Use cases

User Onboarding Software
Feature Adoption Software
NPS & Surveys
Announcements
Insights
Mobile Adoption

Company

About
Careers
we're Hiring

Support

Developer Docs
Contact

Resources

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

Follow us

Facebook iconTwitter icon greyLinkedin iconInstagram icon
© 2022 Appcues. All rights reserved.
SecurityTerms of ServicePrivacy Policy
Expand