question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hot to set session timeout?

See original GitHub issue

Hi there! Thank you for you module! I’d like to know hot to set the session timeout with ES6? Now I make it in such way:

    <script>
        (function (i, s, o, g, r, a, m) {
            i['GoogleAnalyticsObject'] = r;
            i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date();
            a = s.createElement(o)
                , m = s.getElementsByTagName(o)[0];
            a.async = 1;
            a.src = g;
            m.parentNode.insertBefore(a, m)
        })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
        ga('create', 'UA-xxx-1', 'auto');
        ga('send', 'pageview');		
			setTimeout(function() {
			ga("send", "event", "New Visitor", location.pathname)
        }, 15000);     		
    </script>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jehnacommented, Jan 19, 2018

If you see your session at Google analytics realtime, you can be 100% sure your code works and the events are firing fine. Good job! 👌

1reaction
jehnacommented, Jan 19, 2018

Ah, I see!

You can use ga-lite exactly the same way in this case as you would in the official Google Analytics: Just replace the ga with galite:

galite('create', 'UA-xxx-1', 'auto');
galite('send', 'pageview');		
setTimeout(function() {
  galite("send", "event", "New Visitor", location.pathname)
}, 15000);   
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set session timeout in web.config - Stack Overflow
Open a browser and go to this page. A session id will be printed. Wait for a minute to pass, then hit refresh....
Read more >
How to Set Session Timeout in ASP.NET - C# Corner
Go to web.config file and add following script where sessionstate timeout is set to 60 seconds. <configuration> ...
Read more >
How to set Session Timeout for Java web application
1. Set session timeout in web.xml file. Open the web.xml file of your web application (under WEB-INF ...
Read more >
Set session timeouts | New Relic Documentation
Go to: user menu > Account settings > Authentication > Session configuration. · Use the slide bar to select a time period for...
Read more >
Set Session Timeout in PHP - Linux Hint
The timeout limit of the session can be set by setting the value of two directives in the php.ini file or using the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found