How to use FS object with Google Tag Manager

New

I have the Full Story capture script implemented with GTM.  I want to use FS.identify, but the it says that FS is not initialized, leading me to believe it’s a different instance.  Do I need to include the script in my code instead of GTM?

0

Comments

1 comment

  • Hi @JimVoss10E! Welcome to the community. You should be able to use FS.identify with GTM. 

    We’d recommend giving FS.identify its own tag in GTM. When users authenticate into your app or navigate to page where they must be logged in, you'll want to fire the tag with the FS.identify() call. You can pass in a variable either from your GTM datalayer or from within your app when you deploy the javascript through GTM.

    One thing you may need to do is check to see if FullStory has loaded before calling FS.identify(). You can do that with window['_fs_ready']. This article has an example of how to use it (it's using FS.getCurrentSessionURL(), but the same logic applies for FS.identify()).

    Hope this helps! If not, let me know. 

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post