doctor-command icon indicating copy to clipboard operation
doctor-command copied to clipboard

Check for Google Analytics

Open danielbachhuber opened this issue 9 years ago • 3 comments

Production sites probably need to make sure Google Analytics is present.

danielbachhuber avatar Jan 03 '17 14:01 danielbachhuber

@danielbachhuber , should this feature scan every file for the ga() function?

Sidsector9 avatar Sep 21 '17 12:09 Sidsector9

should this feature scan every file for the ga() function?

I was thinking we'd implement some form of Template_Render check and then scan the rendered template.

See how wp profile renders the template here: https://github.com/wp-cli/profile-command/blob/master/inc/class-profiler.php#L449-L451

danielbachhuber avatar Sep 21 '17 16:09 danielbachhuber

There are dozens of different tracking solutions, and there's overarching "tag consolidation" like Google Tag Manager.

You'd need to check for "a tracking solution", but I don't think you can reliably do that. Google Analytics just happens to be one of the more popular ones because it is free.

schlessera avatar Sep 24 '17 06:09 schlessera