本样例主要是提供图片事件跟踪采集的脚本例字。
样例一
采集内容
点击需要采集“跳转url” 和"图片地址src"
移入 / 移出需要采集"图片地址src"数据
采集位置:首页 ( I-00:BAN-01)
采集事件:click, hin(Mouseover) , hout(Mouseout)
采集代码:
click_tracker.track( 'send' , {
hitType: 'event',
eventCategory: 'IMG ',
eventAction: 'click',
eventLabel: 'I-00:BAN-01' ,
eventValue:{to:"/portal/html/lifestyle/dog.html",src:'http://static.modernavenue.com/portal/data/images/index/pic/bannerd.jpg'}
});
_tracker.track( 'send' , {
hitType: 'event',
eventCategory: 'IMG ',
eventAction: 'hin',
eventLabel: 'I-00:BAN-01' ,
eventValue:{src:'http://static.modernavenue.com/portal/data/images/index/pic/bannerd.jpg'}
});
_tracker.track( 'send' , {
hitType: 'event',
eventCategory: 'IMG ',
eventAction: 'hout',
eventLabel: 'I-00:BAN-01' ,
eventValue:{src:'http://static.modernavenue.com/portal/data/images/index/pic/bannerd.jpg'}
});
样例二
采集内容
点击需要采集“跳转url” 和"图片地址src"
移入 / 移出需要采集"图片地址src"数据
采集位置:首页 ( I-00:BAN-03-02)
采集事件:click, hin(Mouseover) , hout(Mouseout)
采集代码:
click_tracker.track( 'send' , {
hitType: 'event',
eventCategory: 'IMG ',
eventAction: 'click',
eventLabel: 'I-00:BAN-03-02' ,
eventValue:{to:"../activity/special_cosmetic_0510.html",src:'http://static.modernavenue.com/portal/data/images/index/pic/bannerd.jpg'}
});
_tracker.track( 'send' , {
hitType: 'event',
eventCategory: 'IMG ',
eventAction: 'hin',
eventLabel: 'I-00:BAN-03-02' ,
eventValue:{src:'http://static.modernavenue.com/portal/data/images/index/pic/bannerd.jpg'}
});
_tracker.track( 'send' , {
hitType: 'event',
eventCategory: 'IMG ',
eventAction: 'hout',
eventLabel: 'I-00:BAN-03-02' ,
eventValue:{src:"http://static.modernavenue.com/portal/data/images/index/pic/bannerd.jpg'}
});
样例三
采集内容
点击需要采集“跳转url” 和"图片地址src"
移入 / 移出需要采集"图片地址src"数据
采集位置:摩登男士 ( M-01:PRO-01-XX)
采集事件:click, hin(Mouseover) , hout(Mouseout)
采集代码:
click_tracker.track( 'send' , {
hitType: 'event',
eventCategory: 'IMG ',
eventAction: 'click',
eventLabel: 'M-01:PRO-01-XX' ,
eventValue:{to:"../mall/moDetail.html?productId=1000010241", src:'http://static.modernavenue.com/img/pictures/B_100000317/1000010241/prdl_113217017_900_1_ls.jpg'}
});
_tracker.track( 'send' , {
hitType: 'event',
eventCategory: 'IMG ',
eventAction: 'hin',
eventLabel: 'M-01:PRO-01-XX' ,
eventValue:{src:'http://static.modernavenue.com/img/pictures/B_100000317/1000010241/prdl_113217017_900_1_ls.jpg'}
});
_tracker.track( 'send' , {
hitType: 'event',
eventCategory: 'IMG ',
eventAction: 'hout',
eventLabel: 'M-01:PRO-01-XX' ,
eventValue:{src:'http://static.modernavenue.com/img/pictures/B_100000317/1000010241/prdl_113217017_900_1_ls.jpg'}
});
样例四
采集内容
点击需要采集关键值 和"图片地址src"
移入 / 移出需要采集"图片地址src"数据
采集位置:产品详情页 ( M-03:PRO-01)
采集事件:click, hin(Mouseover) , hout(Mouseout)
采集代码:
click_tracker.track( 'send' , {
hitType: 'event',
eventCategory: 'IMG ',
eventAction: 'click',
eventLabel: 'M-03:PRO-01' ,
eventValue:{values:{productId:1000010223}, src:'http://static.modernavenue.com/img/pictures/B_100000318/1000010223/prdl_111217265_900_1_dl.jpg'}
});
_tracker.track( 'send' , {
hitType: 'event',
eventCategory: 'IMG ',
eventAction: 'hin',
eventLabel: 'M-03:PRO-01' ,
eventValue:{src:'http://static.modernavenue.com/img/pictures/B_100000318/1000010223/prdl_111217265_900_1_dl.jpg'}
});
_tracker.track( 'send' , {
hitType: 'event',
eventCategory: 'IMG ',
eventAction: 'hout',
eventLabel: 'M-03:PRO-01' ,
eventValue:{src:'http://static.modernavenue.com/img/pictures/B_100000318/1000010223/prdl_111217265_900_1_dl.jpg'}
});