Javascript Access Page Data

I’m trying to add logged in users names into a co-browsing app called Median. Currently the UI screen shows me unique serial numbers but I can replace it with javascript code using this command:

// Use a string reconizable by your agents, such as an email address
var bName = document.getElementById(‘fullName’).innerHTML

In seo/metatags>script in the body (to load on every page) I added a script so that I can generate a new id to co-browse:

I created an HTML box and set it’s ID with dynamic data like so:

For some reason the javascript code will not read that data and let me use it.

You cannot add a body. The page itself already have a body.
Did you try just with p tag?

1 Like

I updated the post with another method I tried, using the HTML element in bubble and settings the id. Is that what you meant?

This topic was automatically closed after 70 days. New replies are no longer allowed.