• In the Plugin’s Basic Data > Visitor settings,
    there is an option to track the Logged in User Role.

    When a User is not logged in, it sets the variable in the dataLayer as “visitorType”:”visitor-logged-out”

    Is there any way to change the variable for the user role to undefined if a user is not logged in rather than visitor-logged-out? Not a string of undefined, simply have the variable value undefined, as undefined wont overwrite the previous value sent for that variable.

    I want to set a custom dimension to user scope so as to filter out Administrator, Editor, Author whether they are logged in or out, and having the user role overwritten when they logged out prevents the ability to filter out their site activity on the front end of the site once they log out. I cant filter via visitor-logged-out as it applies to all site visitors when not logged in.
    It would also be helpful in filtering out site staff that are on dynamic IPs

    Logged in/out status can already be checked via the Plugin’s Basic Data > Visitor settings Logged in status option.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    I understand the idea behind your setup but changing this in the plugin core could break lots of existing implementation.

    What if you:
    #1 … create a new custom JS variable on the GTM UI that simply returns undefined
    #2 … create a lookup table that will have one line which will replace the logged-out value with this undefined variable but in all other cases the default data layer value will be returned?

    Or you could do this logic within a single custom JS variable.

    Thread Starter Whims

    (@whims)

    Hi, I appreciate your prompt reply.

    Will look into your suggestions over the weekend.

    Thank you! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing Logged In User Role for Logged Out Users’ is closed to new replies.