I have two tags on same page.
First tag works on page view and contains custom html that push a value to dataLayer.
<script>
$(document).ready(function ($) {
$('ul li').click(function(){
console.log("index:"+$(this).index());
dataLayer.push({'clicked_slider_tab_index': $(this).index()});
});
});
</script>
And second tag firing on element click with Universal analytic type using this dataLayer variable in Label field.
Problem is that. When second tag firing it's {{dataLayer - clicked_slider_tab_index}} variable has previous value. console.log works as expected but somehow dataLayer.push is not working as expected.
I can only detect index clicked in previous action.