javascript - Google Tag Manager not firing on link click in site footer? -


this first post - have searched answer in other questions couldn't find hoping can specific question?

i'm trying track link that's sat in 'floating' bar in footer of this site:

the link #browsealoud - when click on screen reader - upon clicking opens pop-up reads out text (to assist sight problems).

i have set tag , trigger in google tag manager, , know works fine when insert below link code in body content, event tracked in google analytics.

however, link sits in floating grey bar in footer, trigger doesn't fire , can't quite work out why. best solution allow me track link clicks on particular link (which appears on pages)?

<a href="#browsealoud" onclick="browsealoud.togglebar(); return false;" class="dark-arrow" data-bapdf="80"><h6>screen reader</h6></a>

it looks me though you've fixed this, think can see ga event firing whenever click.

in case, think problem there 2 different places can click obtain same result; text 'screen reader' child of element includes arrow, clicking obtain different set of attributes.

i woudl set custom javascript variable parent href reads href of parent of clicked object. example...:

function() { return {{click element}}.parentelement.href; } 

and set trigger fires when either click url or parent href equal #browsealoud.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -