-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #317 from skial/ga_track_outbound_links
Add outbound link tracking.
- Loading branch information
Showing
7 changed files
with
138 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
INPUT="$@" | ||
electron --enable-logging . -w 1920 -h 1080 --input "//$INPUT/index.html" --script ./script.js --outputDir "//bin" --show \ | ||
--scripts linkqueue.js font.characters.js sitemap.js checkmissing.js screengrab.js version.js | ||
--scripts linkqueue.js checkmissing.js font.characters.js sitemap.js screengrab.js version.js | ||
find $INPUT -name "*.html" | xargs -P 6 -n 1 htmlmin.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
browserify ./node_modules/autotrack/lib/plugins/outbound-link-tracker.js > ./src/js/outbound-link-tracker.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
CLOSURE=./node_modules/google-closure-compiler/compiler.jar | ||
INPUT="$@" | ||
#echo $INPUT | ||
STR="${INPUT:3}" | ||
BIN=./bin$STR | ||
BIN_DIR=${BIN%/*} | ||
BIN_BASE="${BIN/$BIN_DIR/}" | ||
BIN_BASE="${BIN_BASE/.css/}" | ||
|
||
MIN=./min$STR | ||
MIN_DIR=${MIN%/*} | ||
MIN_BASE="${MIN/$MIN_DIR/}" | ||
MIN_BASE="${MIN_BASE/.js/}" | ||
|
||
OPT=./opt$STR | ||
OPT_DIR=${OPT%/*} | ||
OPT_BASE="${OPT/$OPT_DIR/}" | ||
#echo $BASE | ||
OPT_BASE="${OPT_BASE/.js/}" | ||
OPT_CRIT=$OPT_DIR$OPT_BASE.crt.js | ||
OPT_TWIN=$OPT_DIR$OPT_BASE.opt.js | ||
|
||
mkdir -p $BIN_DIR | ||
mkdir -p $MIN_DIR | ||
mkdir -p $OPT_DIR | ||
|
||
cp $INPUT $BIN | ||
cp $BIN $MIN | ||
cp $MIN $OPT | ||
|
||
java -jar $CLOSURE --js $INPUT --compilation_level SIMPLE_OPTIMIZATIONS --js_output_file $BIN | ||
java -jar $CLOSURE --js $INPUT --compilation_level ADVANCED_OPTIMIZATIONS --js_output_file $OPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters