add google analytics and facebook scripts && improve url share method w/ fb && enforce https in prod
This commit is contained in:
@@ -3,11 +3,31 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{% block metas %}{% endblock %}
|
||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
||||
{% block stylesheets %}{% endblock %}
|
||||
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}"/>
|
||||
<script type="text/javascript">
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
i['GoogleAnalyticsObject'] = r;
|
||||
i[r] = i[r] || function () {
|
||||
(i[r].q = i[r].q || []).push(arguments)
|
||||
}, i[r].l = 1 * new Date();
|
||||
a = s.createElement(o),
|
||||
m = s.getElementsByTagName(o)[0];
|
||||
a.async = 1;
|
||||
a.src = g;
|
||||
m.parentNode.insertBefore(a, m)
|
||||
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
|
||||
|
||||
ga('create', 'UA-88761060-1', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="fb-root"></div>
|
||||
<header>
|
||||
{% block header %}{% endblock %}
|
||||
</header>
|
||||
@@ -22,9 +42,12 @@
|
||||
<script type="text/javascript">
|
||||
window.fbAsyncInit = function () {
|
||||
FB.init({
|
||||
appId: '320599508311862',
|
||||
appId: '{{ facebook_api }}',
|
||||
xfbml: true,
|
||||
version: 'v2.8'
|
||||
cookie: true,
|
||||
status: true,
|
||||
oauth: true,
|
||||
version: '{{ facebook_api_version }}'
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user