Javascript Graphic Tracking | Extensions

Silver Contributor
Silver Contributor

Hi Everyone,

 

 

I want to figure out if this Javascript Graphic (http://josephmendesdesign.com/private/wig/) is trackable? I'm still learning the functionality of Extensions and need some expert advice.

 

Thank you,

Jon

3 REPLIES 3

Javascript Graphic Tracking | Extensions

Tealium Employee

@jonathan_mantil

 

Hi Jonathan,

 

So you picked a hard area to begin with! The level of tracking that you want is only possible with access to the DockMenu.js file. If you has access to that then you could get which icon was clicked.

 

What you are able to do is track to see if anyone clicked on the canvas object and work out where they clicked. But seeing as the icons move, not sure how much help that will be.

 

Adrian

 

Ask me anything Tealium related or TypeScript/JavaScript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.

Javascript Graphic Tracking | Extensions

Silver Contributor
Silver Contributor

Thanks so much for responding @adrian_browning!

 

 

If I do have access to the DockMenu.js, what would the extension or javascript look like? Could you provide an example?

Javascript Graphic Tracking | Extensions

Tealium Employee

@jonathan_mantil

 

So with access to the DockMenu.js file you would need to modify this section of code:

 

DockMenuJS.png

 

Using the o Object you will have access to data like:

 

{
container : c,
height : 103,
id : 9,
imageHeight : 103,
imagePath : "load/images/9.jpg",
imageWidth : 150,
imgContainer: c,
setImage : function(a,b,c),
text : "Shop VersaFiber Styles",
url : "https://www.wig.com/category/brands/versafiber+wigs.do",
width : 150
}

 

 I would guess you would want to do something like:

 

function jb(a) {
        var b = a.target.id;
        utag.link({link_id : o[b].id, link_text : o[b].text}, function(){
        if (e && S.allowUrlClick) {           
            window.open(o[b].url, S.windowLocation)
        }
       });
        
    }

Hope this helps,

 

Adrian

Ask me anything Tealium related or TypeScript/JavaScript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.
Public