Fire a Tag when setup a value from JS code

oscarmartinezm
Rookie Contributor
oscarmartinezm

Hi all, 

I have a Tag and I would like to fire when I setup an specific value. I've created an UDO variable and my Tag looks like:Screen Shot 2019-11-15 at 9.03.13 AM.png

My expectation is this code should make it fire:

document.getElementById('my-btn').addEventListener('click', function(){
    utag_data.fire_type = 'user_interaction';
});

But it doesn't. Instead of that, I have to call < utag.view() > to make it work:

document.getElementById('my-btn').addEventListener('click', function(){
    utag_data.fire_type = 'user_interaction';
    utag.view({}, function() {
        utag.o['my-profile'].sender['1766'].send('view', utag_data);
        sessionStorage.setItem(idTagType, '1');
    }, ['1766']);
});

 

P.S.: I know, should not be necessary to call < profile.sender.send() > but it's not being automatically called. Also, I have to pass < utag_data > as parameter for getting the new value updated in called tag (I use that value into the tag).

Thanks!

1 REPLY 1

Fire a Tag when setup a value from JS code

oscarmartinezm
Rookie Contributor
oscarmartinezm

I also tried this configuration:Screen Shot 2019-11-15 at 9.32.47 AM.png