The website has standard AddtoCart button but after clicking, user can add more units to their basket.
Problem is, AddtoCart event in dataLayer fires only once on the first clicking the button.
How can I delay firing the tag after this event so that I send final hit to GA when user is done adding units?
URL: https://shop.iglobus.cz/cz/rajata-cherry-na-stonku-strabena-250-g/8594192220046
This button:
becomes this:
Thank you.
I'm trying to modify an event that has guestsCanModify set to true from an attendee's calendar. If I update the event in the user's primary calendar, in google calendar I see You have made changes to details of this event that will only be reflected on this calendar and event in the original calendar is not updated. If I try to update the event in the original calendar, I get 404. If I make the changes manually through google calendar UI as that user, the changes are propagated to the original calendar.
What am I missing here?
I'm running into an issue for a form submission event firing too often (200x). The trigger for the event is created from the GTM standard Trigger Type of "Form Submission" where we're checking validation and have specified the conditions to be only on the Page URL where the form exists. We've tested it in GTM preview mode and seeing that the event fires.
Update 1/28-
The form is on a pop-up through our homepage (https://mybrightwheel.com) after the user clicks on "Request a Demo" (so the event fire should not happen on this initial button click). The event fire should occur after they get into the demo request form and complete a successful form submit. And below that is a shot of the trigger. Any help here is appreciated.
That trigger hasn't specified which button it's firing on. You have 2 buttons in that screenshot, it's recording both. You need to tell it to fire on one button or the other by specifying link text or link url (i.e. where the user ends up on clicking the link)
I have a page with search button, and an tag event that should be fired when the button is pressed.
My question is if the loading of the new page (that should be displayed when the 'search' button is pressed) will be delayed until after the code in the tag event is finished, or is it done asynchronously somehow
default loading of the new page will be delayed until after the code in the tag event is finished. Tags are usually fired as a listener to click event and they're executed before the default action. However, if your search button has some custom listener that redirects to a new page and overrides the default action then tag may not fire correctly.
When loading a page for the first time (!IsPostback), I am creating a button in code and adding it to my page, then adding an event handler to the click event.
However, when clicking the button, after the page reloads, my event handler does not fire.
Can anyone explain why?
#Brad: Your answer isn't complete; he's most likely doing it too late in the page lifecycle, during the Page_Load event.
Okay, here's what you're missing.
ASP.NET is stateless. That means, after your page is rendered and sent to the browser, the page object and everything on it is destroyed. There is no link that remains on the server between that page and what is on the user's browser.
When the user clicks a button, that event is sent back to the server, along with other information, like the hidden viewstate field.
On the server side, ASP.NET determines what page handles the request, and rebuilds the page from scratch. New instances of server controls are created and linked together according to the .aspx page. Once it is reassembled, the postback data is evaluated. The viewstate is used to populate controls, and events are fired.
This all happens in a specific order, called the Page Lifecycle. In order to do more complex things in ASP.NET, such as creating dynamic controls and adding them to the web page at runtime, you MUST understand the page lifecycle.
With your issue, you must create that button every single time that page loads. In addition, you must create that button BEFORE events are fired on the page. Control events fire between Page_Load and Page_LoadComplete.
You want your controls loaded before ViewState information is parsed and added to controls, and before control events fire, so you need to handle the PreInit event and add your button at that point. Again, you must do this EVERY TIME the page is loaded.
One last note; page event handling is a bit odd in ASP.NET because the events are autowired up. Note the Load event handler is called Page_Load...
You need to add the button always not just for non-postbacks.
If you are not reattaching the event handler on every postback, then the event will not exist for the button. You need top make sure the event handler is attached every time the page is refreshed. So, here is the order of events for your page:
Page is created with button and event handler is attached
Button is clicked, causing a postback
On postback, the page_load event skips the attaching of the event handler becaue of your !IsPostback statement
At this point, there is no event handler for the button, so clicking it will not fire your event
That is because the event binding that happens needs to be translated in to HTML. This postback that happens if bound to the page between OnInit and OnLoad. So if you want the button to bind events correclty make sure you do the work in OnInit.
See the Page Life Cycle explaination.
http://msdn.microsoft.com/en-us/library/ms178472.aspx