Private
Public Access
1
0

add google analytics and facebook scripts && improve url share method w/ fb && enforce https in prod

This commit is contained in:
2016-12-11 15:10:25 +01:00
parent c0d75e43f3
commit 875d2d71db
11 changed files with 113 additions and 34 deletions

View File

@@ -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 }}'
});
};

View File

@@ -40,6 +40,9 @@ framework:
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
globals:
facebook_api: "%facebook.api%"
facebook_api_version: "%facebook.version%"
# Doctrine Configuration
doctrine:

View File

@@ -32,6 +32,10 @@ monolog:
type: console
channels: [!event, !doctrine]
parameters:
facebook.api: 320599508311862
facebook.version: 'v2.8'
# Facebook OAuth
hwi_oauth:
firewall_names: [secured_area]

View File

@@ -23,6 +23,10 @@ monolog:
console:
type: console
parameters:
facebook.api: 320597498312063
facebook.version: 'v2.8'
# Facebook OAuth
hwi_oauth:
firewall_names: [secured_area]

View File

@@ -4,11 +4,14 @@ fos_user:
JotunheimrUserBundle:
resource: "@JotunheimrUserBundle/Resources/config/routing.yml"
prefix: /
schemes: [https]
JotunheimrAdminBundle:
resource: "@JotunheimrAdminBundle/Resources/config/routing.yml"
prefix: /
schemes: [https]
MineSeekerBundle:
resource: "@MineSeekerBundle/Resources/config/routing.yml"
prefix: /
schemes: [https]

View File

@@ -12,3 +12,4 @@ _errors:
_main:
resource: routing.yml
schemes: [http]