Just wanted to implement a logout feature to my website. So if you end the session it automatically logs out so just wanted to know how to end a google tag manager session or logout(You know what I mean. please help !!! )
Google Tag Manager does not keep sessions, it strictly operates page based and does not persist anything from page to page (unless you implement it yourself via custom html tags). So there is no GTM session you need to end.
Related
I'm trying to set up GTM to avoid including any tracking JavaScript (GA, FB Pixel, Linkedin, etc) code for users logged in to the website. Only administrators can be logged in and the site is using WordPress so my theory is that simply checking that the WordPress logged-in cookie is set will allow me to add conditions to my triggers checking for the cookie.
The problem is that a 32-character hash is attached to the end of the cookie name. Something like this:
wordpress_logged_in_c61670c29894a13760815de6f19b9544
How do I check for this in GTM?
I would like to avoid adding custom code to the website if possible. I know that adding a quick PHP function to set and remove a cookie would be quick and easy. I'd just like to see how it could be done in GTM.
In GTM I have a 1st Party Cookie called DL - WP Login Cookie. I'm just not sure what to place in the Cookie Name field since the cookie name is different for each user.
Can this be done?
I have a Plone-4.3-based site which provides access to another site as well: Whenever someone logs in to my site, (s)he can click on special hyperlinks and proceed to that other site without the need to enter a password there (some kind of simple SSO, based on a ReST interface).
Now I have the need to logout the user from that other site whenever (s)he logs out from my own site, e.g. by sending a special request which is of course not the topic of this question (perhaps it still needs to be implemented, because session expiration used to be good enough.)
How would I accomplish this, to be precise: Where would I hook in that secondary logout code? Is there some kind of logout hook, or should I modify some logout.[c]py view? I couldn't find no event nor category mentioned in the Event types section here.
There is the Products.PlonePAS.events.UserLoggedOutEvent for such purposes.
As an example, it is explained at the Events Section of the Plone Addon Developer Guide
I help manage a site that had classic google analytics installed and it has recently migrated to universal analytics via Google Tag Manager.
Now when travelling to a subdomain google is appending the cookie information to the anchor, as a querystring value.
?_ga=1.94005085.150702697.1452253355
Apparently this has didn't happen with classic analytics, even though the set up is like this:
pageTracker._trackPageview(getPageUri(true));
pageTracker._setAllowLinker(true);
Does anyone know if the url will be changed when travelling to a sub domain on classic analytics with the above options?
This is down to how your cookies are setup. For hypothetical purposes assume that your website and subdomain are:
www.website.com
subdomain.website.com
These domains can share a cookie and therefore share the Google Analytics information however unless you specifically set the custom variable of cookieDomain to auto (with GTM tag setup: #3 Configure Tag > More Settings > Fields to set > + Add Field > cookieDomain | auto) you essentially have two distinct cookies for each domain.
I also presume you have then also setup "Cross-Domain Tracking" and included "website.com" within "Auto Link Domains" setting in GTM.
TL;DR: Updating your cookieDomain settings to utilise "auto" will force GTM to first attempt to set a cookie for .com (which will fail) and then attempt to set one for "website.com" (will work work) and your cross domain tracking won't be required.
Bonus info: However to add some context for your question the code pageTracker._setAllowLinker(true); allows the linker to be applied to URL's in Classic Analytics, you would still need to decorate your links with code such as below, if you didn't have this before your links wouldn't have included the linker code (and wouldn't have shared cookied if on different cookie domains/paths).
<a href="http://www.my-example-blogsite.com/intro"
onclick="_gaq.push(['_link', 'http://www.my-example-blogsite.com/intro.html']); return false;">
See my blog</a>
I want to track the user on site with HTTP session.
Means a single visit is considered as a single HTTP session.
we need this so that multiple entries are not added in table while user navigate through some pages.
If you are using form-authentication then you can use global method session_start
Here is a link which may help you.http://msdn.microsoft.com/en-us/library/ms178583.aspx
I have a several site collections in the same web application and I need to handle events when user goes from one site collection to another. I need it for specific actions, like setting "lcid" cookie for changing default language of site and claims values to user properties mapping.
Currently I'm using custom HTTP module, which handles all PostAuthorize web application requests and checks current user and site collection, holds last visited site for each user in collection and fires a custom event for subscribers, when detects transition between site collections.
But I think this approach slows down performance of web application. And from logs I see that there are to many PostAuthorize requests even when user simply clicks a link to page in other site collection. Also, in similar cases sometimes there is a series of requests to "next" site collection, then to "previous", and then again to "next". Also there are some issues with SharePoint Designer (can't edit page) become when this module is active.
Could you give me a advice with better approaches for this task? Thanks in advance.
1 way is using a hidden control and cookie.
Keep a hidden control in all the masterpage of all the targeted sitecollections.
This control will check the current site collection url and save it in a cookie. Possibly in the same cookie where you are storing lcid.
From next load onwards it will try and match the url in the cookie and the current site collection url. If different call the code you want to execute and update the url in the cookie.
This will be much lighter on performance than an httpmodule.