Polymer 1.2 wrapper element for google tag manager.
So far only basic functionality is implemented, I've not messed up with extra dataLayer support and stuff.
Check out the demo
Install with bower or download the zip
bower install --save sespiros/google-tag-manager
Import it in your code
<!-- for relative paths -->
<link rel="import"href="../bower_components/google-tag-manager/google-tag-manager.html">
<google-tag-manager cid="GTM-XXXXXX"></google-tag-manager>
If you wish to work on your element in isolation, we recommend that you use Polyserve to keep your element's bower dependencies in line. You can install it via:
npm install -g polyserve
And you can run it via:
polyserve
Once running, you can preview your element at
http://localhost:8080/components/google-tag-manager/
.
Feel free to extend it or propose new functionality