locales.fr = www.fluidbook.com
locales.en = en.fluidbook.com
-
acl.perpage = true
acl.roles[] = superadmin
acl.roles[] = admin
minify.js = false
-seo.universalAnalytics =
+seo.universalAnalytics = UA-4339912-9
httpauth.username = fluidbook
httpauth.password = fb2016
// Take form ID from URL so we can differentiate between the popup and the embedded versions of the form
if ($formID) {
$form->setId($formID);
- $form->setAction($form->getAction() .'/'. $formID);
+ $form->setAction($form->getAction() . '/' . $formID);
} else {
$formID = $form->getId();
}
$xml = simplexml_load_file($url);
$okmessage = array_pop($xml->xpath('//alert'));
- if(null!==$okmessage){
- $okmessage=(string)$okmessage->content;
+ if (null !== $okmessage) {
+ $okmessage = (string)$okmessage->content;
}
-
- $this->_datas->addReplace('#'. $formID, '<div id="confirmationQuote">' . $okmessage . '</div>');
+
+ $this->_datas->addReplace('#' . $formID, '<div id="confirmationQuote">' . $okmessage . '</div>');
+ $this->_datas->addGAEvent('form', 'sent', 'quote');
} else {
$this->_datas->refreshForm($form); // Respond with validation errors
$this->_datas->addAction('eval', "displayErrors('$formID')");
+ $this->_datas->addGAEvent('form', 'error', 'quote');
}
}
protected function _rollover($f, $category) {\r
$res = '';\r
if ($f->getUrl()) {\r
- $res = $this->link(__('Voir le Fluidbook'), $f->getUrl(), array('class' => 'button'));\r
+ $res = $this->link(__('Voir le Fluidbook'), $f->getUrl(), array('class' => 'button', 'data-event' => array('category' => 'exemple', 'action' => 'see', 'label' => $f->getTitle())));\r
}\r
if ($category == 3) {\r
$firstCat = 0;\r
public function linkQuote($label) {\r
$this->headScript()->addScriptAndStyle('005-fancyselect');\r
$this->headScript()->addScriptAndStyle('315-quote');\r
- return $this->linkPopup($label, '/ajaxpopup/quoteForm', array('class' => 'quoteLink'));\r
+ return $this->linkPopup($label, 'internal:contact', array('data-popup-href' => '/ajaxPopup/quoteForm', 'class' => 'quoteLink', 'data-event' => array('category' => 'form', 'action' => 'open', 'label' => 'quote')));\r
}\r
}
\ No newline at end of file
$res .= '<style type="text/css">';\r
$res .= '#s-' . $social['icon'] . ':hover{background-color: ' . $social['color'] . ';border-color: ' . $social['color'] . ';}';\r
$res .= '</style>';\r
- $res .= '<a href="' . $social['url'] . '" id="s-' . $social['icon'] . '" class="social-link fb-' . $social['icon'] . '" target="_blank">';\r
+ $res .= $this->link('', $social['url'], array('id' => 's-' . $social['icon'], 'class' => 'social-link fb-' . $social['icon'], 'data-event' => array('category' => 'social', 'action' => 'go', 'label' => $social['icon'])));\r
$res .= '</a>';\r
}\r
$res .= '</div>'; // .footer-external\r
\r
$res .= '<div class="workshop">';\r
-$res .= $this->linkCMS($this->option('workshop'), array('class' => 'workshop-link'));\r
+$res .= $this->linkCMS($this->option('workshop'), array('class' => 'workshop-link', 'data-event' => array('category' => 'external', 'action' => 'go', 'label' => 'workshop')));\r
$res .= '</div>'; // .workshop\r
\r
$res .= '</div>'; // .external-links\r
var zoom = 1;\r
\r
function load_common() {\r
+ // Google analytics\r
+\r
+ $('a[href^="mailto:"]').not('[data-event]').each(function () {\r
+ var email = $(this).attr('href').split(':');\r
+ var label = email.pop();\r
+ var e = {\r
+ category: 'email',\r
+ action: 'click',\r
+ label: label,\r
+ value: 1\r
+ };\r
+ $(this).attr('data-event', JSON.stringify(e));\r
+ });\r
+\r
+ $('a[href^="tel:"]').not('[data-event]').each(function () {\r
+ var tel = $(this).attr('href').split(':');\r
+ var label = tel.pop();\r
+\r
+ var e = {\r
+ category: 'tel',\r
+ action: 'call',\r
+ label: label,\r
+ value: 1\r
+ };\r
+ $(this).attr('data-event', JSON.stringify(e));\r
+ });\r
+\r
+ $(document).on('click', '[data-event]', function () {\r
+ var e = $(this).data('event');\r
+ if (e.value === undefined) {\r
+ e.value = 1;\r
+ }\r
+ if (e.action === undefined) {\r
+ e.action = 'click';\r
+ }\r
+\r
+ e.label = e.label.replace(/%href%/gi, $(this).attr('href'));\r
+\r
+ ga('send', 'event', e.category, e.action, e.label, e.value);\r
+ return true;\r
+ });\r
+\r
+\r
$(window).on('cubeitresize', resize);\r
resize();\r
}\r
min-width: @content-min-width;\r
-moz-text-size-adjust: 100%;\r
-webkit-text-size-adjust: 100%;\r
+ color: #151e28;\r
\r
@media @m900 {\r
font-size: 12px;\r
}\r
}\r
\r
-.content-wrapper {\r
+main .content-wrapper {\r
width: auto !important;\r
box-sizing: content-box; // Needed so we can control the content max-width without the % padding interfering\r
max-width: 670px;\r