Skip to content

Commit

Permalink
Merge pull request #4 from invit/master
Browse files Browse the repository at this point in the history
Allow complex data structures, not just strings
  • Loading branch information
xyNNN committed Jul 10, 2015
2 parents 7ea0452 + 0250f2d commit 3d39f9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/views/tagmanager.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Google Tag Manager START -->
{% if data is not null %}
<script>
dataLayer = [{ {% for key, value in data %}'{{ key }}': '{{ value }}'{% if loop.last %}{% else %}, {% endif %}{% endfor %} }];
dataLayer = [{ {% for key, value in data %}'{{ key }}': {{ value|json_encode|raw }}{% if loop.last %}{% else %}, {% endif %}{% endfor %} }];
</script>
{% endif %}

Expand Down

0 comments on commit 3d39f9a

Please sign in to comment.