Tagged: av_button, javascript
-
AuthorPosts
-
August 6, 2018 at 11:31 pm #994147
Our site is using pixel tracking to monitor an ad campaign. We have the pixels firing correctly on the page, but we are having a hard time getting the javascript call to work with av_button code. Currently the code is:
[av_button label='REGISTER HERE' link='manually,http://events.trustevent.com/index.cfm?eid=' link_target='_blank' size='x-large' position='center' icon_select='no' font='entypo-fontello' color='theme-color-highlight' custom_font='' custom_class='' admin_preview_bg='' onmousedown="fireButtonPub('url','spdzoe1','a2b0ect')"]
We also have loaded a javascript function on the page for ‘fireButtonPub’. Since this isn’t working, what are we doing wrong?
Thanks
August 7, 2018 at 1:21 pm #994405Hey chris_cirlot,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaAugust 7, 2018 at 3:46 pm #994463Victoria,
I’ve included admin access and a link to one of the pages in question. It is the Volunteer page. The javascript code is at the top of the page in the code block, and the button code is below that in a text block.
Thanks for looking…
August 7, 2018 at 8:27 pm #994553Hi,
The parameter onmousedown=”fireButtonPub(‘url’,’spdzoe1′,’a2b0ect’)” is not a valid shortcode parameter. I converted the button shortcode to html, inserted it into a code block element and added some custom js code – the code in the code block now looks like:<div class="avia-button-wrap avia-button-center avia-builder-el-5 avia-builder-el-no-sibling av_register_here_button"><a href="http://events.trustevent.com/index.cfm?eid=3040" class="avia-button avia-icon_select-no avia-color-theme-color-highlight avia-size-x-large avia-position-center" onclick="init_fireButtonPub('url','spdzoe1','a2b0ect');" target="_blank"><span class="avia_iconbox_title">REGISTER HERE</span></a></div> <script type="text/javascript"> function init_fireButtonPub(url, adv, pubid) { fireButtonPub(url, adv, pubid); return true; } function fireButtonPub(url, adv, pubid) { var pubiframe = document.createElement('iframe'); pubiframe.src = '//insight.adsrvr.org/tags/' + adv + '/' + pubid + '/iframe'; pubiframe.width = 0; pubiframe.height = 0; pubiframe.frameborder = 0; pubiframe.scrolling = "no"; document.body.appendChild(pubiframe); setTimeout(function(){ window.location = url; }, 1000); } </script>
Best regards,
Dude -
AuthorPosts
- You must be logged in to reply to this topic.