I am setting up a new trigger in GTM and I am having trouble tracking it. Normally I would check everything using the GTM debug window/console.
When I have this open and click on the button I wish to track nothing appears.
I am trying to track a button, not a link.
The button is:
<button id="trigger-onlineSizer" class="btn btn-default">Find your size</button>
However when I click on other links they are tracked, for example this link does show and is trackable.
<nav class="button-bar">
<a href="#" id="btn--bodyheight" class="button button--next-screen">
Next
</a>
</nav>
In GTM I have made sure that I have enabled, under the Variables config all items below, Pages, Utilities, Clicks and Forms.
Any guidance on how to track such a button in GTM would be much appreciated,
Thanks,
Related
I wanted to navigate to the browsers back page (History) onclick of Back button. How I can achieve this usign zul page? I have one option of keeping the hidden field and redirect via composer or using zk's if condition. But any other solution like javascripts function are?
You can use client side javascript in combination with Java Script's history object:
<zk xmlns="http://www.zkoss.org/2005/zul">
<div>
<button label='back'
xmlns:w="client"
w:onClick="history.back();"
/>
</div>
</zk>
I have two submit buttons inside a form:
<input class="submitButton button cancel" name="cancel"
value="Cancel" title="" type="submit">
<input class="submitButton button" name="Registrieren"
value="Register" title="Register" type="submit">
I would like the first button (cancel) to have a link to an external page. The link is known in the backend (FormController).
I had a look at the SubmitLink class. However it looks like that doesn't fit to my use case. I don't want to process the click on the "cancel" button in the backend, just redirect to the external page by integrating this dynamic link into the HTML file.
I agree with #jurgemaister that you can use <a> for the cancel button and style it with CSS to look like a button.
Otherwise you can add 'click' JavaScript listener to the cancel button to do something like location.href='/url/to/other/page'.
I'm working on a site that another designer built: http://bigbolts.qa.aztekhq.com/. The products in the New Products and Recently Viewed areas on that page have two buttons with tooltips on them, and when they are clicked, they are supposed to trigger other link events: "More Information" goes to the detail page, "Add To Cart" triggers a modal. This works fine on desktops, but not on touch devices. On my iPhone and iPad, touching the links only triggers the tooltips and nothing else. I added data-options="disabled-for-touch:true" to the links, but it does not seem to be working.
foundation makes it easy to disable or enable on touch-enabled devices, just add class= "show-for-touch" or "hide-for-touch" to the element you want to disable. code example below.
<p class="panel">
<strong class="show-for-touch">You are on a touch-enabled device.</strong>
<strong class="hide-for-touch">You are not on a touch-enabled device.</strong>
</p>
Ahem... according to the tooltips documentation, it is better to add data-options="disable_for_touch:true" to your link. Like this:
<span data-tooltip data-options="disable_for_touch:true" class="has-tip" title="Tooltips are awesome!">
Your Cart
</span>
on my django app, I have a Facebook connect button (via django allauth). When I click that, the facebook dialog box appears. Now, i want that after login, the user is redirected to a popup (bootstrap modal) with the list of friends of the user.
I have a test function for obtaining the list of friends in my views.py and it works well. What I need is that after the facbook dialog box login, it goes to this function, gets the friendlist, and return the result in a popup on the original page.
I tried setting LOGIN_REDIRECT_URL = '/friends', which takes me to the view function and gets the friendlist, but how do I show this list in that popup? I'm using django-allauth with the bootstrap library.
Any help on this would be greatly appreciated.
load the friends page inside a modal
You can use the remote option of the modal to load the html from the friends page inside the modal. See the docs and look for remote.
Add a modal to the page where you want to show the modal:
<div class="modal hide fade" id="myModalFriends" aria-hidden="true" data-show="true">
<div class="modal-header">
<h3>Friend list</h3>
</div>
<div class="modal-body">Friend page will load here.</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div>
Then, after successful login:
$('#myModalFriends').modal({
remote: '/friends'
});
This will load the html from your /friends page inside a modal.
open a modal box the friend page loads
If you want to show your friend list in a modal box on the friends page, you can call $('#myModal').modal(); in document ready to show it on startup; see this fiddle.
Good Day
I am using an ASP.NET webform where I have wrapped the following button inside the form tags:
<form runat="server">
<button class="btn btn-primary" onclick="window.location='http://google.co.za';">Login</button>
</form>
ISSUE: The problem is that when clicking on the button, it just directs to the current page...does not redirect. However, when I remove the form tags, the button works. If I leave the form tags and I use an anchor tag to relocate, it works as well...It is just the button that is giving me issues.
Why is that?
I am using Twitter bootstrap as well(extra info..)
Thank you
Add type="button" attribute to your button tag. Without it button works as submit.