Provides an analytics. Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4. For details, see the Google Developers Site Policies.
Guides Reference Support. Function signature ga command, [ Adding commands to the queue Invoking the ga command queue function with the following function signature will push commands onto the queue to be scheduled for execution once the library is loaded.
Usage ga command, [ The identifier is made up of three parts the first two being optional : [trackerName. If no tracker name is specified, the command is invoked on the default tracker. If pluginName is specified, the methodName must be a method provided by the plugin. When not specifying a plugin name, this method must be one of the command methods listed below. The number of and specific fields allowed varies depending on the command method being called.
Examples See the command methods section below for individual command examples. Ready callback Invoking the ga command queue function by passing it a function will schedule the passed function for execution at the next point in the queue.
Usage ga readyCallback Parameters Name Type Required Description readyCallback Function yes A callback function to be invoked when the library is fully loaded and ready to be interacted with.
Usage ga 'create', [ trackingId ], [ cookieDomain ], [ name ], [fieldsObject] ; Parameters See the field reference for individual field documentation. According to Google Analytics Help Center ,. Visitors must have JavaScript, images, and cookies enabled in their browsers in order for Analytics to report their visit. Since you're not able to set cookies, ga. No cookies get set; no request is sent to google, so nothing is logged in GA.
Weird footnote: I observed some weird behavior where the GA cookies would set as third-party cookies of the domain of an unrelated imported script from a third party non-CDN domain. This could be because since the server sends HTTP cookies with the file, ga. Instead of all of that GA code, you would include the script, and then call it using the following code:. The drawback is that cookieless means that it won't be able to track visits accurately, just page-view level data.
Local file include an iframe on our server. In the iframe the onresize function gets triggered and allows us to submit GA calls by inspecting the hash. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more.
Asked 11 years, 4 months ago. Active 10 months ago. Viewed 11k times. Improve this question. Alex Wayne Alex Wayne k 45 45 gold badges silver badges bronze badges. Checked here among other places but maybe GA blocks this? Wel in my cases this is webkit powered browsers, primarily.
Do you get an error message in your console? No output whatsoever. Inlcluding push — Alex Wayne. Show 2 more comments. Active Oldest Votes. Improve this answer. Community Bot 1 1 1 silver badge. Jim Geurts Jim Geurts Official Plugins.
Adds another command to the ga command queue to send a pageview to Google Analytics for the current page. Alternative async tag While the Google Analytics tag described above ensures the script will be loaded and executed asynchronously on all browsers, it has the disadvantage of not allowing modern browsers to preload the script. Google Analytics processes this data and can infer a great deal of information including: The total time a user spends on your site.
The time a user spends on each page and in what order those pages were visited. What internal links were clicked based on the URL of the next pageview. What browser and operating system are being used. Screen size and whether Flash or Java is installed. The referring site.
0コメント