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
# send logs for all traffic (including non-html) to google analytics | |
# | |
# in server block: | |
# set $google_analytics_id "UA-THECORRECT-ID"; | |
# include /srv/nginx/google_analytics; | |
# | |
# in location blocks: | |
# post_action @ga; | |
# | |
# notes: post_action has been referred to by nginx devs as a "dirty hack" and this approach may stop working one day. |