Skip to content

missiondata/google-analytics-code-inserter-perl-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Instructions etc This is a short script to go through a directory of files and insert Google Analytics code It is set up to even take care of files with s p a c e s in the names! If you run it twice, it will not duplicate the GA code, as it checks if there is already code before the Run this script using the following command line: find . -name "*.html" -print0 | xargs -0 perl perl-replacer.pl Easily make replacements in that command to look for different file extensions or insert the FULL path to the perl-replacer.pl script on your file system the -print0 and xargs -0 allow this script to work with files with s p a c e s in the names, see man find or man xargs for details This scripts github project can be found at https://github.com/missiondata/google-analytics-code-inserter-perl-script

This script could very easily be used for other types of mass replacements where the thing to be replaced is a single word or line, and the replacement is multiple lines of text.

About

This is a perl script to insert Google Analytics code into .html or .php files in an existing website that does not yet contain Google Analytics code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages