I have a code similar to this one:
tit prod 1
Lore ipsum 1
tit prod 2
Lore ipsum 2
tit prod 3
Lore ipsum 3
tit prod 4
Lore ipsum 4
tit prod 5
Lore ipsum 5
tit prod 6
Lore ipsum 6
I use a "jQuery onHandler" extension "triggers on show" to send an impression with the products from Tab1. But I don't know how to send the impression from Tab2 when the user push the second link.
I'm sorry, I'm seeing that the code is a bit illegible.
The jQuery selector for the first tab is #contentTab1 .contentProd h3
Trigger on: show
Tracking event: link
It works perfectly and send the impression of all products.
But I need send another impression from the other products, only when the user push in the second link to show the other tab.
The selector in this case would be #contentTab2 .contentProd h3
Thank you very much
I think I didn't explain correctly the situation.
When the page loads, the user only see the information of the first tab (the second one is hidden by display:none), so I send an impression with these products (products in first tab).
Only when the user clicks on the "tab2" link (and appears the second tab) is when I need to send the new impression (products in second tab).
I can use a comma-separated list of selectors:
#contentTab1 .contentProd h3, #contentTab2 .contentProd h3
But in that case I would send the impression of all products when the page loads, while I need to send the list of products of the second tab only when it is shown.
I guess I need to use a different extension to send the impressions for the second tab.
Vicente, that should not be the case, let's make sure I am understanding the scenario correctly by restating what I think you're asking:
What I think you are asking:
"When the page loads the content in Tab 1 is visible and that information is correctly tracked with the view events that occur on page load but how can I fire view events when someone clicks on Tab 2 and that content is displayed instead of Tab 1?"
If that is correct, the the jQuery onHandler extension should meet your needs, it's simply a question of finding the correct jQuery selector to trigger on.
I'd recommend reaching out to your account manager to set up a working session with us so that we can step through the real code and use case with you.
Clint this is more o less the situation, the point is that when someone clicks on the Tab 2 there isn't a different selector of which ones are in the page in the begining.
When someone clicks on the link, the new Tab appears by a change in the style attribute (display:none -> display:block).
This is why I don't know how to fire the event, I haven't a new selector.
Ok, I'll speak with my account manager.
Thank you very much.