Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
synhelper
Commits
e5df3e27
Commit
e5df3e27
authored
Jun 15, 2018
by
Anton P
Browse files
added Google Analitycs targets
parent
31645b67
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Hook/FormContactMessageFormAlter.php
View file @
e5df3e27
...
@@ -7,7 +7,7 @@ use Drupal\Core\Form\FormStateInterface;
...
@@ -7,7 +7,7 @@ use Drupal\Core\Form\FormStateInterface;
use
Drupal\Core\Ajax\HtmlCommand
;
use
Drupal\Core\Ajax\HtmlCommand
;
/**
/**
*
Form
Contact
MessageFormAlter
.
*
Ajax
Contact
Form
.
*/
*/
class
FormContactMessageFormAlter
extends
ControllerBase
{
class
FormContactMessageFormAlter
extends
ControllerBase
{
...
@@ -83,6 +83,11 @@ class FormContactMessageFormAlter extends ControllerBase {
...
@@ -83,6 +83,11 @@ class FormContactMessageFormAlter extends ControllerBase {
$myScript
.
=
'console.log("'
.
$formId
.
'");'
;
$myScript
.
=
'console.log("'
.
$formId
.
'");'
;
}
}
$myScript
.
=
'</script>'
;
$myScript
.
=
'</script>'
;
$myScript
.
=
'<script type="text/javascript">'
;
$myScript
.
=
"if (typeof dataLayer != 'undefined') {dataLayer.push({'event': '"
.
$goals
[
$formId
]
.
"'});}"
;
$myScript
.
=
'</script>'
;
$response
->
addCommand
(
new
HtmlCommand
(
'#synapse-custom-ajax-cover'
,
$myScript
));
$response
->
addCommand
(
new
HtmlCommand
(
'#synapse-custom-ajax-cover'
,
$myScript
));
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment