Changeset 1682630
- Timestamp:
- 06/21/2017 01:17:38 PM (9 years ago)
- Location:
- piwik-pro-tag-manager-integration
- Files:
-
- 52 added
- 10 edited
-
tags/2.1.0 (added)
-
tags/2.1.0/.htaccess (added)
-
tags/2.1.0/AUTHORS.txt (added)
-
tags/2.1.0/LICENSE.txt (added)
-
tags/2.1.0/README.txt (added)
-
tags/2.1.0/assets (added)
-
tags/2.1.0/assets/css (added)
-
tags/2.1.0/assets/css/index.html (added)
-
tags/2.1.0/assets/css/style.css (added)
-
tags/2.1.0/assets/index.html (added)
-
tags/2.1.0/assets/js (added)
-
tags/2.1.0/assets/js/index.html (added)
-
tags/2.1.0/assets/js/script.js (added)
-
tags/2.1.0/framework (added)
-
tags/2.1.0/framework/filterer.php (added)
-
tags/2.1.0/framework/index.html (added)
-
tags/2.1.0/framework/plugin.php (added)
-
tags/2.1.0/framework/singleton.php (added)
-
tags/2.1.0/includes (added)
-
tags/2.1.0/includes/body.php (added)
-
tags/2.1.0/includes/cron.php (added)
-
tags/2.1.0/includes/files.php (added)
-
tags/2.1.0/includes/functions.php (added)
-
tags/2.1.0/includes/head.php (added)
-
tags/2.1.0/includes/http.php (added)
-
tags/2.1.0/includes/index.html (added)
-
tags/2.1.0/includes/section.php (added)
-
tags/2.1.0/includes/settings.php (added)
-
tags/2.1.0/includes/tag-manager.php (added)
-
tags/2.1.0/index.html (added)
-
tags/2.1.0/languages (added)
-
tags/2.1.0/languages/index.html (added)
-
tags/2.1.0/languages/piwik-pro-tag-manager-integration-pl_PL.mo (added)
-
tags/2.1.0/languages/piwik-pro-tag-manager-integration-pl_PL.po (added)
-
tags/2.1.0/plugin.php (added)
-
tags/2.1.0/screenshot-1.png (added)
-
tags/2.1.0/screenshot-2.png (added)
-
tags/2.1.0/templates (added)
-
tags/2.1.0/templates/body.php (added)
-
tags/2.1.0/templates/code.php (added)
-
tags/2.1.0/templates/config.php (added)
-
tags/2.1.0/templates/cron.php (added)
-
tags/2.1.0/templates/head.php (added)
-
tags/2.1.0/templates/htaccess.php (added)
-
tags/2.1.0/templates/index.html (added)
-
tags/2.1.0/templates/input.php (added)
-
tags/2.1.0/templates/link.php (added)
-
tags/2.1.0/templates/menu.php (added)
-
tags/2.1.0/templates/notice.php (added)
-
tags/2.1.0/templates/page.php (added)
-
tags/2.1.0/templates/rules.php (added)
-
tags/2.1.0/templates/section.php (added)
-
trunk/AUTHORS.txt (modified) (1 diff)
-
trunk/README.txt (modified) (4 diffs)
-
trunk/includes/body.php (modified) (3 diffs)
-
trunk/includes/head.php (modified) (2 diffs)
-
trunk/includes/section.php (modified) (12 diffs)
-
trunk/languages/piwik-pro-tag-manager-integration-pl_PL.mo (modified) (previous)
-
trunk/languages/piwik-pro-tag-manager-integration-pl_PL.po (modified) (6 diffs)
-
trunk/plugin.php (modified) (1 diff)
-
trunk/templates/body.php (modified) (1 diff)
-
trunk/templates/head.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
piwik-pro-tag-manager-integration/trunk/AUTHORS.txt
r1571169 r1682630 3 3 Piotr Niewiadomski <http://piotr.press> 4 4 5 Great thanks to Clearcode <https://clearcode.cc> for allowing releasing Piwik PRO Tag Manager integration plugin as free software!5 Great thanks to Piwik PRO <https://piwik.pro> for allowing releasing Piwik PRO Tag Manager integration plugin as free software! -
piwik-pro-tag-manager-integration/trunk/README.txt
r1605209 r1682630 3 3 Tags: Piwik PRO, Piwik, tag manager, Piwik Tag Manager, Piwik PRO Tag Manager, analytics 4 4 Requires at least: 4.7 5 Tested up to: 4. 7.25 Tested up to: 4.8 6 6 Stable tag: trunk 7 7 License: GPLv3 … … 14 14 The WordPress Piwik PRO Tag Manager integration plugin allows you to include both the synchronous and asynchronous tags. When triggering the tags in a synchronous way, it adds the snippets of Piwik PRO Tag Manager’s code to the HTML head section. If you trigger them asynchronously, it places them directly after the opening body HTML tag. 15 15 16 All you have to do is provide your Piwik PRO Tag Manager server’s URL and the UUID of the container.16 All you have to do is provide your Piwik PRO Tag Manager server’s URL and the ID of the website. 17 17 18 18 _To learn more about which type of tags you should use (e.g. asynchronous or synchronous tags), read the [Tags](https://piwik.pro/docs/tag-manager-guides/tags/ "Piwik PRO Tag Manager - Tags Documentation") section in the Piwik PRO Tag Manager's documentation._ … … 65 65 = Once Activated = 66 66 67 Visit 'Settings > Piwik PRO Tag Manager Integration', add your server's URL in the 'Server URL' field, fill in the ' Container UUID' field, and then decide where you would like to place the Piwik PRO Tag Manager snippet.67 Visit 'Settings > Piwik PRO Tag Manager Integration', add your server's URL in the 'Server URL' field, fill in the 'Website ID' field, and then decide where you would like to place the Piwik PRO Tag Manager snippet. 68 68 69 69 **Please note** … … 105 105 == Screenshots == 106 106 107 1. **WordPress General Settings** - Visit 'Settings > Piwik PRO Tag Manager integration', add your server's URL in the 'Server URL' field, fill in the ' Container UUID' field, and then decide where you would like to place the Piwik PRO Tag Manager snippet (`wp_head` is the preferred location for firing synchronous tags – e.g. for A/B testing and `wp_head_open` is the preferred location for firing asynchronous tags).108 2. **Piwik PRO Tag Manager Containers Settings** - Visit 'Piwik PRO Tag Manager > Containers' and take note of the Container UUID you want to implement into your site. Then, write that container UUID in the 'Container UUID' field in your WordPress Dashboard.107 1. **WordPress General Settings** - Visit 'Settings > Piwik PRO Tag Manager integration', add your server's URL in the 'Server URL' field, fill in the 'Website ID' field, and then decide where you would like to place the Piwik PRO Tag Manager snippet (`wp_head` is the preferred location for firing synchronous tags – e.g. for A/B testing and `wp_head_open` is the preferred location for firing asynchronous tags). 108 2. **Piwik PRO Tag Manager Containers Settings** - Visit 'Piwik PRO Tag Manager > Containers' and take note of the Website ID you want to implement into your site. Then, write that Website ID in the 'Website ID' field in your WordPress Dashboard. 109 109 110 110 == Changelog == 111 112 = 2.1.0 = 113 *Release date: 21.06.2017* 114 115 * Changed ABSPATH to WP_CONTENT_DIR & WP_CONTENT_URL to support roots/bedrock (reported by pimplaatsman). 116 * Changed Container UUID to Website ID. 117 * Added support to Piwik PRO Tag Manager version < 1.16.0 118 * Updated snippets templates to support Piwik PRO Marketing Suite. 111 119 112 120 = 2.0.0 = -
piwik-pro-tag-manager-integration/trunk/includes/body.php
r1605209 r1682630 89 89 'url' => $this->url, 90 90 'container' => $this->container, 91 'time' => $this->get_ver() ? date( 'Y-m-d H:i:s', $this->get_ver() ) : '' 91 'time' => $this->get_ver() ? date( 'Y-m-d H:i:s', $this->get_ver() ) : '', 92 'snippet' => $this->snippet 92 93 ) ); 93 94 } 94 95 95 96 public function get_file( $pattern = self::SCRIPT ) { 96 return ABSPATH. $this->get_dir() . sprintf( $pattern, $this->container );97 return WP_CONTENT_DIR . $this->get_dir() . sprintf( $pattern, $this->container ); 97 98 } 98 99 … … 105 106 $cache ) 106 107 $url = $this->rewrite ? 107 untrailingslashit( get_site_url( null, $this->get_rewrite()) ) :108 untrailingslashit( get_site_url( null, $this->get_dir()) );108 untrailingslashit( $this->get_domain( $this->get_rewrite(), true ) ) : 109 untrailingslashit( WP_CONTENT_URL . $this->get_dir() ); 109 110 else $url = $this->url; 110 111 … … 133 134 if ( ! $content = Files::get_content( $this->get_noscript( false ) ) ) return false; 134 135 135 Files::mkdir( ABSPATH. $this->get_dir() . '/' . $this->container );136 Files::mkdir( WP_CONTENT_DIR . $this->get_dir() . '/' . $this->container ); 136 137 Files::put_content( $this->get_file( self::NOSCRIPT ), $content ); 137 138 } -
piwik-pro-tag-manager-integration/trunk/includes/head.php
r1605209 r1682630 38 38 39 39 return Tag_Manager::get_template( 'head', array( 40 'script' => $script, 41 'time' => $this->get_ver() ? date( 'Y-m-d H:i:s', $this->get_ver() ) : '' 40 'script' => $script, 41 'time' => $this->get_ver() ? date( 'Y-m-d H:i:s', $this->get_ver() ) : '', 42 'snippet' => $this->snippet 42 43 ) ); 43 44 } … … 71 72 $pos = stripos( $content, '</head>' ); 72 73 $content = substr_replace( $content, Tag_Manager::get_template( 'head', array( 73 'script' => $this->get_ver() ? add_query_arg( 'ver', $this->get_ver(), $this->get_script() ) : $this->get_script(), 74 'time' => $this->get_ver() ? date( 'Y-m-d H:i:s', $this->get_ver() ) : '' 74 'script' => $this->get_ver() ? add_query_arg( 'ver', $this->get_ver(), $this->get_script() ) : $this->get_script(), 75 'time' => $this->get_ver() ? date( 'Y-m-d H:i:s', $this->get_ver() ) : '', 76 'snippet' => $this->snippet 75 77 ) ), $pos, 0 ); 76 78 } -
piwik-pro-tag-manager-integration/trunk/includes/section.php
r1605209 r1682630 37 37 protected $rewrite = false; 38 38 protected $ver = false; 39 protected $snippet = '1.16.0'; 39 40 40 41 protected function __construct() { … … 79 80 } 80 81 82 $settings['snippet'] = ! empty( $option['snippet'] ) ? '1.16.0' : '1.15.3'; 83 81 84 return $settings; 82 85 } … … 90 93 if ( ! $content = Files::get_content( $this->get_script( false ) ) ) return false; 91 94 92 Files::mkdir( ABSPATH. $this->get_dir() );95 Files::mkdir( WP_CONTENT_DIR . $this->get_dir() ); 93 96 Files::put_content( $this->get_file(), $content ); 94 97 } 95 98 96 99 public function clear() { 97 Files::rmdir( ABSPATH. $this->get_dir() );98 Files::mkdir( ABSPATH. $this->get_dir() );100 Files::rmdir( WP_CONTENT_DIR . $this->get_dir() ); 101 Files::mkdir( WP_CONTENT_DIR . $this->get_dir() ); 99 102 } 100 103 … … 103 106 if ( Settings::instance()->get_tab() !== $this->get_class() ) return; 104 107 105 $dir = ABSPATH. $this->get_dir();108 $dir = WP_CONTENT_DIR . $this->get_dir(); 106 109 $code = Tag_Manager::get_template( 'code', array( 'content' => $dir ) ); 107 110 if ( ! Files::file_exists( $dir ) ) echo Tag_Manager::get_template( 'notice', array( 'content' => sprintf( Tag_Manager::__( 'Dir: %s does not exists!' ), $code ) ) ); … … 130 133 'before' => 'http(s)://', 131 134 'after' => '', 132 'desc' => sprintf( 133 Tag_Manager::__( 'Learn more about %s on the Piwik PRO Tag Manager documentation page.' ), 134 '<a href="https://piwik.pro/docs/tag-manager-guides/getting-started/" target="_blank">' . Tag_Manager::__( 'Getting started' ) . '</a>' 135 ) 136 ) 137 ); 138 139 add_settings_field( static::class .'\container', Tag_Manager::__( 'Container UUID' ), array( 135 'desc' => '' 136 ) 137 ); 138 139 add_settings_field( static::class .'\container', Tag_Manager::__( 'Website ID' ), array( 140 140 $this, 141 141 'input' … … 147 147 'before' => '', 148 148 'after' => '', 149 'desc' => sprintf( 150 Tag_Manager::__( 'Learn more about %s on the Piwik PRO Tag Manager documentation page.' ), 151 '<a href="https://piwik.pro/docs/tag-manager-guides/containers/" target="_blank">' . Tag_Manager::__( 'Containers' ) . '</a>' 152 ) 149 'desc' => '' 153 150 ) 154 151 ); … … 226 223 'desc' => sprintf( 227 224 Tag_Manager::__( 'Use this option if you want to serve the script from a cached file' ) . ':<br />' . 228 Tag_Manager::get_template( 'code', array( 'content' => $this->get_domain( $this->get_dir(), true ) ) ) 225 Tag_Manager::get_template( 'code', array( 226 'content' => $this->get_domain( str_replace( $this->get_domain( '', true ) , '', WP_CONTENT_URL ) . $this->get_dir(), true ) 227 ) 228 ) 229 229 ) 230 230 ) … … 275 275 'domain' => $domain, 276 276 'rewrite' => $this->get_rewrite(), 277 'dir' => $this->get_dir()277 'dir' => str_replace( $this->get_domain( '', true ) , '', WP_CONTENT_URL ) . $this->get_dir() 278 278 ) ); 279 279 … … 320 320 'desc' => sprintf( 321 321 Tag_Manager::__( 'Delete all the cached files and directories from' ) . ':<br />' . 322 Tag_Manager::get_template( 'code', array( 'content' => ABSPATH. $this->get_dir() ) )322 Tag_Manager::get_template( 'code', array( 'content' => WP_CONTENT_DIR . $this->get_dir() ) ) 323 323 ) 324 324 ) … … 339 339 Tag_Manager::__( "Add the %s parameter in the query string for the scripts' url with the timestamp." ), 340 340 Tag_Manager::get_template( 'code', array( 'content' => 'ver' ) ) 341 ) 342 ) 343 ); 344 345 add_settings_field( static::class . '\snippet', Tag_Manager::__( 'Snippet' ), array( 346 $this, 347 'input' 348 ), $this->get_class(), $this->get_class(), array( 349 'type' => 'checkbox', 350 'class' => 'snippet', 351 'name' => static::class . '[snippet]', 352 'value' => $snippet = '1.16.0', 353 'checked' => version_compare( $this->snippet, $snippet, '>=' ) ? 'checked' : '', 354 'before' => '', 355 'after' => 'Piwik PRO Tag Manager ' . Tag_Manager::__( 'version' ) . ' >= ' . $snippet, 356 'desc' => sprintf( 357 Tag_Manager::__( "Uncheck this option to enable support for older versions" ) 341 358 ) 342 359 ) … … 426 443 $cache ) 427 444 $url = $this->rewrite ? 428 untrailingslashit( get_site_url( null, $this->get_rewrite()) ) :429 untrailingslashit( get_site_url( null, $this->get_dir()) );445 untrailingslashit( $this->get_domain( $this->get_rewrite(), true ) ) : 446 untrailingslashit( WP_CONTENT_URL . $this->get_dir() ); 430 447 else $url = $this->url; 431 448 … … 448 465 449 466 public function get_file() { 450 return ABSPATH. $this->get_dir() . sprintf( static::SCRIPT, $this->container );467 return WP_CONTENT_DIR . $this->get_dir() . sprintf( static::SCRIPT, $this->container ); 451 468 } 452 469 453 470 public function get_dir() { 454 $dir = ' wp-content/cache';471 $dir = '/cache'; 455 472 if ( is_multisite() ) { 456 473 $site = (array)get_site(); -
piwik-pro-tag-manager-integration/trunk/languages/piwik-pro-tag-manager-integration-pl_PL.po
r1605209 r1682630 2 2 msgstr "" 3 3 "Project-Id-Version: Piwik PRO Tag Manager Integration\n" 4 "POT-Creation-Date: 2017-0 2-27 17:17+0100\n"5 "PO-Revision-Date: 2017-0 2-27 17:17+0100\n"4 "POT-Creation-Date: 2017-06-20 18:37+0200\n" 5 "PO-Revision-Date: 2017-06-20 18:38+0200\n" 6 6 "Last-Translator: Piotr Niewiadomski <[email protected]>\n" 7 7 "Language-Team: Piwik PRO | Piotr Niewiadomski <[email protected]>\n" … … 47 47 msgstr "Błędny kod odpowiedzi" 48 48 49 #: includes/section.php:1 0749 #: includes/section.php:110 50 50 #, php-format 51 51 msgid "Dir: %s does not exists!" 52 52 msgstr "Folder: %s nie istnieje!" 53 53 54 #: includes/section.php:1 0854 #: includes/section.php:111 55 55 #, php-format 56 56 msgid "Dir: %s is not writable!" 57 57 msgstr "Folder: %s nie ma uprawnień do zapisu!" 58 58 59 #: includes/section.php:1 0959 #: includes/section.php:112 60 60 #, php-format 61 61 msgid "Dir: %s is not readable!" 62 62 msgstr "Folder: %s nie ma uprawnień do odczytu!" 63 63 64 #: includes/section.php:11 164 #: includes/section.php:114 65 65 msgid "Server not supports URL rewriting." 66 66 msgstr "Serwer nie obsługuje przepisywania adresów." 67 67 68 #: includes/section.php:12 268 #: includes/section.php:125 69 69 msgid "Server URL" 70 70 msgstr "URL Serwera" 71 71 72 #: includes/section.php:133 includes/section.php:15073 #, php-format74 msgid "Learn more about %s on the Piwik PRO Tag Manager documentation page."75 msgstr "Dowiedz się więcej o %s na stronie dokumentacji Piwik PRO Tag Manager."76 77 #: includes/section.php:13478 msgid "Getting started"79 msgstr "Jak zacząć"80 81 72 #: includes/section.php:139 82 msgid "Container UUID" 83 msgstr "UUID Kontenera" 84 85 #: includes/section.php:151 86 msgid "Containers" 87 msgstr "Kontenerach" 88 89 #: includes/section.php:156 73 msgid "Website ID" 74 msgstr "Identyfikator Strony" 75 76 #: includes/section.php:153 90 77 msgid "Method" 91 78 msgstr "Metoda" 92 79 93 #: includes/section.php:16 880 #: includes/section.php:165 94 81 #, php-format 95 82 msgid "Paste the following code after %s tag in your theme: %s." 96 83 msgstr "Wklej następujący kod po znaczniku %s Twojego motywu: %s." 97 84 98 #: includes/section.php:16 985 #: includes/section.php:166 99 86 msgid "Preferred method." 100 87 msgstr "Preferowana metoda." 101 88 102 #: includes/section.php:18 889 #: includes/section.php:185 103 90 #, php-format 104 91 msgid "" … … 109 96 "motywie." 110 97 111 #: includes/section.php:18 998 #: includes/section.php:186 112 99 #, php-format 113 100 msgid "It will add snippet in %s section using %s." 114 101 msgstr "Skrypt zostanie dodany w sekcji %s przy użyciu %s." 115 102 116 #: includes/section.php:19 7103 #: includes/section.php:194 117 104 msgid "Dependencies" 118 105 msgstr "Zależności" 119 106 120 #: includes/section.php:20 8107 #: includes/section.php:205 121 108 #, php-format 122 109 msgid "Comma separated %s handles. Works only with %s method." … … 125 112 "%s." 126 113 127 #: includes/section.php:21 5114 #: includes/section.php:212 128 115 msgid "Cache" 129 116 msgstr "Pamięć podręczna" 130 117 131 #: includes/section.php:22 5includes/section.php:337118 #: includes/section.php:222 includes/section.php:337 132 119 msgid "enable/disable" 133 120 msgstr "włącz/wyłącz" 134 121 135 #: includes/section.php:22 7122 #: includes/section.php:224 136 123 msgid "Use this option if you want to serve the script from a cached file" 137 124 msgstr "Użyj tej opcji jeśli chcesz serwować skrypt z pamięci podręcznej." … … 191 178 msgstr "Dodaj parametr %s ze znacznikiem czasu do adresu url skryptu." 192 179 193 #: includes/section.php:349 includes/settings.php:64 180 #: includes/section.php:345 181 msgid "Snippet" 182 msgstr "Snippet" 183 184 #: includes/section.php:355 185 msgid "version" 186 msgstr "wersja" 187 188 #: includes/section.php:357 189 msgid "Uncheck this option to enable support for older versions" 190 msgstr "Odznacz tą opcję aby uruchomić wsparcie dla starszych wersji" 191 192 #: includes/section.php:366 includes/settings.php:64 194 193 #, php-format 195 194 msgid "Include tags in %s section" … … 204 203 msgstr "Ustawienia" 205 204 205 #~ msgid "Piwik PRO Tag Manager version >= 1.16.0" 206 #~ msgstr "Piwik PRO Tag Manager version >= 1.16.0" 207 208 #~ msgid "Piwik PRO Tag Manager 1.16.0" 209 #~ msgstr "Piwik PRO Tag Manager 1.16.0" 210 211 #~ msgid "Learn more about %s on the Piwik PRO Tag Manager documentation page." 212 #~ msgstr "" 213 #~ "Dowiedz się więcej o %s na stronie dokumentacji Piwik PRO Tag Manager." 214 215 #~ msgid "Getting started" 216 #~ msgstr "Jak zacząć" 217 218 #~ msgid "Containers" 219 #~ msgstr "Kontenerach" 220 221 #~ msgid "Container UUID" 222 #~ msgstr "UUID Kontenera" 223 206 224 #~ msgid "Container ID" 207 225 #~ msgstr "ID Kontenera" -
piwik-pro-tag-manager-integration/trunk/plugin.php
r1605209 r1682630 5 5 Plugin URI: https://wordpress.org/plugins/piwik-pro-tag-manager-integration 6 6 Description: The plugin integrates WordPress site with Piwik PRO Tag Manager, allowing to add/modify website’s tags without the need to involve IT department. 7 Version: 2. 0.07 Version: 2.1.0 8 8 Author: piwikpro 9 9 Author URI: https://piwik.pro -
piwik-pro-tag-manager-integration/trunk/templates/body.php
r1605209 r1682630 1 <?php if ( ! defined( 'ABSPATH' ) ) exit; ?><?php if ( ! empty( $url ) && ! empty( $container ) && ! empty( $script ) && ! empty( $noscript ) ) : ?><!-- Piwik PRO Tag Manager <?php if ( ! empty( $time ) ) : ?>@ <?= $time; ?> <?php endif; ?>--><script type="text/javascript">(function(window,document,script,dataLayer,id){window[dataLayer]=window[dataLayer]||[],window[dataLayer].push({start:(new Date).getTime(),event:"stg.start"});var scripts=document.getElementsByTagName(script)[0],tags=document.createElement(script),dl="dataLayer"!=dataLayer?"?dataLayer="+dataLayer:"";tags.async=!0,tags.src="<?= $script; ?>"+dl,scripts.parentNode.insertBefore(tags,scripts);})(window,document,'script','dataLayer','<?= $container; ?>');</script><noscript><iframe src="<?= $noscript; ?>" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><!-- / Piwik PRO Tag Manager --><?= "\n"; ?><?php endif; ?>1 <?php if ( ! defined( 'ABSPATH' ) ) exit; ?><?php if ( ! empty( $url ) && ! empty( $container ) && ! empty( $script ) && ! empty( $noscript ) && ! empty( $snippet ) ) : ?><?php if ( version_compare( $snippet, '1.16.0', '>=' ) ) : ?><!-- Piwik PRO Tag Manager <?php if ( ! empty( $time ) ) : ?>@ <?= $time; ?> <?php endif; ?>--><script type="text/javascript">(function(window,document,script,dataLayer,id){function stgCreateCookie(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d="; expires="+e.toUTCString()}document.cookie=a+"="+b+d+"; path=/"}var isStgDebug=(window.location.href.match("stg_debug")||window.document.cookie.match("stg_debug"))&&!window.location.href.match("stg_disable_debug");stgCreateCookie("stg_debug",isStgDebug?1:"",isStgDebug?365:-1);window[dataLayer]=window[dataLayer]||[],window[dataLayer].push({start:(new Date).getTime(),event:"stg.start"});var scripts=document.getElementsByTagName(script)[0],tags=document.createElement(script),dl="dataLayer"!=dataLayer?"?dataLayer="+dataLayer:"";tags.async=!0,tags.src="<?= $script; ?>"+dl,isStgDebug&&(tags.src=tags.src+"?stg_debug"),scripts.parentNode.insertBefore(tags,scripts);})(window,document,'script','dataLayer','<?= $container; ?>');</script><noscript><iframe src="<?= $noscript; ?>" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><!-- / Piwik PRO Tag Manager --><?= "\n"; ?><?php else : ?><!-- Piwik PRO Tag Manager <?php if ( ! empty( $time ) ) : ?>@ <?= $time; ?> <?php endif; ?>--><script type="text/javascript">(function(window,document,script,dataLayer,id){window[dataLayer]=window[dataLayer]||[],window[dataLayer].push({start:(new Date).getTime(),event:"stg.start"});var scripts=document.getElementsByTagName(script)[0],tags=document.createElement(script),dl="dataLayer"!=dataLayer?"?dataLayer="+dataLayer:"";tags.async=!0,tags.src="<?= $script; ?>"+dl,scripts.parentNode.insertBefore(tags,scripts);})(window,document,'script','dataLayer','<?= $container; ?>');</script><noscript><iframe src="<?= $noscript; ?>" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><!-- / Piwik PRO Tag Manager --><?= "\n"; ?><?php endif; ?><?php endif; ?> -
piwik-pro-tag-manager-integration/trunk/templates/head.php
r1605209 r1682630 1 <?php if ( ! defined( 'ABSPATH' ) ) exit; ?><?php if ( ! empty( $script ) ) : ?><!-- Piwik PRO Tag Manager <?php if ( ! empty( $time ) ) : ?>@ <?= $time; ?> <?php endif; ?>--><script src="<?= $script; ?>"></script><!-- / Piwik PRO Tag Manager --><?= "\n"; ?><?php endif; ?>1 <?php if ( ! defined( 'ABSPATH' ) ) exit; ?><?php if ( ! empty( $script ) && ! empty( $snippet ) ) : ?><?php if ( version_compare( $snippet, '1.16.0', '>=' ) ) : ?><!-- Piwik PRO Tag Manager <?php if ( ! empty( $time ) ) : ?>@ <?= $time; ?> <?php endif; ?>--><script type="text/javascript">function stgCreateCookie(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d="; expires="+e.toUTCString()}document.cookie=a+"="+b+d+"; path=/"}var isStgDebug=(window.location.href.match("stg_debug")||window.document.cookie.match("stg_debug"))&&!window.location.href.match("stg_disable_debug");stgCreateCookie("stg_debug",isStgDebug?1:"",isStgDebug?365:-1);var url = "<?= $script; ?>" + (isStgDebug ? "?stg_debug" : "");document.write('<script src="' + url + '"></' + 'script>');</script><!-- / Piwik PRO Tag Manager --><?= "\n"; ?><?php else : ?><!-- Piwik PRO Tag Manager <?php if ( ! empty( $time ) ) : ?>@ <?= $time; ?> <?php endif; ?>--><script src="<?= $script; ?>"></script><!-- / Piwik PRO Tag Manager --><?= "\n"; ?><?php endif; ?><?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.