Search code examples
phpgoogle-analyticsdrupal-6

How to delete custom variable of google analytics


For testing purpose, mistakenly I created unwanted custom variable. Now I want to delete those variable. Is there any way to delete those variable?

I had created those variables using the following script

<script type="text/javascript">
   pageTracker._setCustomVar(1,"Author","Xyz abc",3);
   pageTracker._setCustomVar(1,"author","Nimbus",3);
</script>

I want to delete both the variables. Thanks in advance.


Solution

  • Try This

     _gaq.push(['_deleteCustomVar', 1]);
    

    https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration#_gat.GA_Tracker_._deleteCustomVar