|
40 | 40 | <link href="{% static 'css/parsifal.css' %}" rel="stylesheet"> |
41 | 41 | {% endcompress %} |
42 | 42 | {% block stylesheet %}{% endblock %} |
43 | | - {% if environment == "production" and google_analytics_ua %} |
44 | | - <!-- Global site tag (gtag.js) - Google Analytics --> |
45 | | - <script async src="https://www.googletagmanager.com/gtag/js?id={{ google_analytics_ua }}"></script> |
46 | | - <script> |
47 | | - window.dataLayer = window.dataLayer || []; |
48 | | - function gtag(){dataLayer.push(arguments);} |
49 | | - gtag('js', new Date()); |
50 | | - gtag('config', '{{ google_analytics_ua }}'{% if user.is_authenticated %}, {'user_id': '{{ user.pk }}'}{% endif %}); |
51 | | - </script> |
| 43 | + |
| 44 | + {% if parsifal_environment == "production" %} |
| 45 | + {% if google_analytics_ua %} |
| 46 | + <!-- Google Analytics --> |
| 47 | + <script async src="https://www.googletagmanager.com/gtag/js?id={{ google_analytics_ua }}"></script> |
| 48 | + <script> |
| 49 | + window.dataLayer = window.dataLayer || []; |
| 50 | + function gtag(){dataLayer.push(arguments);} |
| 51 | + gtag('js', new Date()); |
| 52 | + gtag('config', '{{ google_analytics_ua }}'{% if user.is_authenticated %}, {'user_id': '{{ user.pk }}'}{% endif %}); |
| 53 | + </script> |
| 54 | + {% endif %} |
| 55 | + |
| 56 | + {% if sentry_dsn %} |
| 57 | + <!-- Sentry --> |
| 58 | + <script src="https://browser.sentry-cdn.com/6.12.0/bundle.min.js" integrity="sha384-S3qfdh3AsT1UN84WIYNuOX9vVOoFg3nB17Jp5/pTFGDBGBt+dtz7MGAV845efkZr" crossorigin="anonymous"></script> |
| 59 | + <script> |
| 60 | + Sentry.init({ |
| 61 | + dsn: "{{ sentry_dsn }}", |
| 62 | + release: "{{ parsifal_release }}", |
| 63 | + environment: "{{ parsifal_environment }}", |
| 64 | + integrations: [new Sentry.Integrations.BrowserTracing()] |
| 65 | + }); |
| 66 | + </script> |
| 67 | + {% endif %} |
52 | 68 | {% endif %} |
| 69 | + |
53 | 70 | </head> |
54 | 71 | <body> |
55 | 72 | <div class="wrapper"> |
|
0 commit comments