#1 2014-10-28 19:51:25

raskrial
Member
Registered: 2014-03-03
Posts: 22

google analytic not displaying

Hey,

i'm working on ionize 1.0.7  and i'm trying to setup my google analytic. all informations in the admin panel are correct.

in my header.php, i got this code :

<head>

	<link rel="stylesheet" href="<ion:theme_url />assets/css/kaia.css">
	<ion:google_analytics />
</head>

but i'm checking over the website and open source file, the script tag for google analytic are not displaying and not generating view on goggle live tracking.

Offline

#2 2014-10-28 21:40:04

epescol
Member
Registered: 2012-05-27
Posts: 86

Re: google analytic not displaying

try with

<ion:setting key="google_analytics" />

Offline

#3 2014-10-29 04:18:40

raskrial
Member
Registered: 2014-03-03
Posts: 22

Re: google analytic not displaying

already tried, don't do anything more. nothing is displayed.

Offline

#4 2014-10-29 04:43:54

raskrial
Member
Registered: 2014-03-03
Posts: 22

Re: google analytic not displaying

dont ask me why it's this way, but...

this is not working for me :

<ion:setting key="google_analytics" />

but, this line is working !

<ion:setting key="google_analytics"></ion:setting>

Last edited by raskrial (2014-10-29 04:44:06)

Offline

#5 2014-10-29 20:05:25

epescol
Member
Registered: 2012-05-27
Posts: 86

Re: google analytic not displaying

you must save the script in Settings => Website settings => Google => Google Tracking Code

example:

 <?php if (ENVIRONMENT == 'production') { //testing ?>

	<!-- Google Analytics Universal START -->
<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','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-???????-?', 'auto');
  ga('send', 'pageview');

</script>
	<!-- Google Analytics Universal END -->
<?php } ?>
 

Offline

What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.

Resources

Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations