Easily link to your google analytics or google tag manager
<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet"> <script src="https://unpkg.com/grapesjs"></script> <script src="https://unpkg.com/grapesjs-ga"></script> <div id="gjs"></div>
const editor = grapesjs.init({ container: '#gjs', height: '100%', fromElement: true, storageManager: false, plugins: ['grapesjs-ga'], });
body, html { margin: 0; height: 100%; }
grapesjs-ga
gtm
ga
gtm-block
ga-block
gtmId
value from google tag manager dashboard
gtmLabel
label for google tag manager block Tag Manager
gtmCategory
category for google tag manager block Google
gtmBlock
options to extend google tag manager block {}
gtmComponent
options to extend google tag manager component model {}
gaId
value from google analytics dashboard
gaLabel
label for google analytics block Analytics
gaCategory
category for google analytics block Google
gaBlock
options to extend google analytics block {}
gaComponent
options to extend google analytics component model {}
https://unpkg.com/grapesjs-ga
npm i grapesjs-ga
git clone https://github.com/ju99ernaut/grapesjs-ga.git
Directly in the browser
<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet"/> <script src="https://unpkg.com/grapesjs"></script> <script src="path/to/grapesjs-ga.min.js"></script> <div id="gjs"></div> <script type="text/javascript"> var editor = grapesjs.init({ container: '#gjs', // ... plugins: ['grapesjs-ga'], pluginsOpts: { 'grapesjs-ga': { /* options */ } } }); </script>
Modern javascript
import grapesjs from 'grapesjs'; import plugin from 'grapesjs-ga'; import 'grapesjs/dist/css/grapes.min.css'; const editor = grapesjs.init({ container : '#gjs', // ... plugins: [plugin], pluginsOpts: { [plugin]: { /* options */ } } // or plugins: [ editor => plugin(editor, { /* options */ }), ], });
Clone the repository
$ git clone https://github.com/ju99ernaut/grapesjs-ga.git $ cd grapesjs-ga
Install dependencies
Start the dev server
Build the source
MIT
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4