Plugin Directory

Changeset 1605209


Ignore:
Timestamp:
02/28/2017 12:34:18 PM (9 years ago)
Author:
piwikpro
Message:

Version 2.0.0

Location:
piwik-pro-tag-manager-integration
Files:
73 added
5 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • piwik-pro-tag-manager-integration/trunk/README.txt

    r1571169 r1605209  
    33Tags: Piwik PRO, Piwik, tag manager, Piwik Tag Manager, Piwik PRO Tag Manager, analytics
    44Requires at least: 4.7
    5 Tested up to: 4.7
     5Tested up to: 4.7.2
    66Stable tag: trunk
    77License: GPLv3
     
    1414The 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.
    1515
    16 All you have to do is provide your Piwik PRO Tag Manager server’s URL and the ID of the container.
     16All you have to do is provide your Piwik PRO Tag Manager server’s URL and the UUID of the container.
    1717
    1818_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._
    1919
    20 The plugin gives you also the possibility to configure the order in which the snippets will be included. To do so, you only need to insert `wp_enqueue_script` handles as a dependencies via plugin’s settings page. However, this will work only with `wp_head` and/or `wp_body_open` method.
     20The plugin gives you also the possibility to configure the order in which the snippets will be included. To do so, you only need to insert `wp_enqueue_script` handles as a dependencies via plugin’s settings page. However, this will work only with `wp_head` and/or `wp_body` method.
    2121
    22 A useful addition is output buffering. Owing to this function, you can use the plugin with any WordPress theme. Use it if you are not sure whether the preferred methods `wp_head` and/or `wp_body_open` function has been added to your theme.
     22A useful addition is output buffering. Owing to this function, you can use the plugin with any WordPress theme. Use it if you are not sure whether the preferred methods `wp_head` and/or `wp_body` function has been added to your theme.
     23
     24You can enable the Piwik PRO Tag Manager scripts caching and control the cache refresh interval - useful when applying the Cache-Busting strategy.
     25
     26You can also enable or disable the version parameter in the query string for the scripts' URLs.
    2327
    2428= What Makes Piwik PRO Tag Manager Stand Out =
     
    6165= Once Activated =
    6266
    63 Visit 'Settings > Piwik PRO Tag Manager Integration', add your server's URL in the 'Server URL' field, fill in the 'Container ID' field, and then decide where you would like to place the Piwik PRO Tag Manager snippet.
     67Visit '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.
    6468
    6569**Please note**
    6670
    6771* `wp_head` is the preferred location for firing synchronous tags (e.g. for A/B testing).
    68 * `wp_body_open` is the preferred location for firing asynchronous tags.
     72* `wp_body` is the preferred location for firing asynchronous tags.
    6973
    7074To 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.
     
    7983== Frequently Asked Questions ==
    8084
    81 = How do I use the wp_body_open function? =
     85= How do I use the wp_body function? =
    8286
    8387Paste the following code directly after the opening `<body>` tag in your theme:
    84 `<?php if ( function_exists( 'wp_body_open' ) ) : wp_body_open(); ?>`
     88`<?php wp_body(); ?>`
    8589
    86 = What's the difference between placing the Piwik PRO Tag Manager snippet in the wp_head or the wp_body_open locations? =
     90= What's the difference between placing the Piwik PRO Tag Manager snippet in the wp_head or the wp_body locations? =
    8791
    8892* `wp_head` is the preferred location for firing synchronous tags (e.g. for A/B testing).
    89 * `wp_body_open` is the preferred location for firing asynchronous tags.
     93* `wp_body` is the preferred location for firing asynchronous tags.
    9094
    9195_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._
     
    9397= What are minimum requirements for the plugin? =
    9498
    95 PHP interpreter version >= 5.3
     99* PHP interpreter version >= 5.3
     100* PHP Curl extension (for cache feature).
     101* Cron scheduler (for cache feature).
     102* Apache Server (for cache and rewrite feature).
     103* Apache mod_rewrite module (for cache and rewrite feature).
    96104
    97105== Screenshots ==
    98106
    99 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 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).
    100 2. **Piwik PRO Tag Manager Containers Settings** - Visit 'Piwik PRO Tag Manager > Containers' and take note of the  Container ID you want to implement into your site. Then, write that container ID in the 'Container ID' field in your WordPress Dashboard.
     1071. **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).
     1082. **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.
    101109
    102110== Changelog ==
     111
     112= 2.0.0 =
     113*Release date: 28.02.2017*
     114
     115* Changed Container ID to UUID.
     116* Renamed the function `wp_body_open` to `wp_body`.
     117* Updated snippets templates.
     118* Added the cache feature.
     119* Added cache refreshing with wp_cron after the time interval selected.
     120* Added rewrite script's url feature.
     121* Added ver parameter to script's url query string with timestamp feature.
    103122
    104123= 1.0.0 =
  • piwik-pro-tag-manager-integration/trunk/includes/functions.php

    r1571169 r1605209  
    2727
    2828if ( ! function_exists( 'wp_body_open' ) ) {
     29    /*
     30     * Deprecated function & action
     31     */
     32    function wp_body_open() {
     33        _deprecated_function( 'wp_body_open', '2.0.0', 'wp_body' );
     34        do_action_deprecated( 'wp_body_open', array(), '2.0.0', 'wp_body' );
     35        do_action( 'wp_body' );
     36    }
     37}
     38
     39if ( ! function_exists( 'wp_body' ) ) {
    2940    /**
    30      * Execute functions hooked on a specific custom action hook - 'wp_body_open'.
     41     * Execute functions hooked on a specific custom action hook - 'wp_body'.
    3142     * According to: https://core.trac.wordpress.org/ticket/12563
    3243     * Add the following code directly after the <body> tag in your theme:
    33      * <?php if ( function_exists( 'wp_body_open' ) ) : wp_body_open(); ?>
    3444     */
    35     function wp_body_open() {
    36         do_action( 'wp_body_open' );
     45    function wp_body() {
     46        do_action( 'wp_body' );
    3747    }
    3848}
  • piwik-pro-tag-manager-integration/trunk/languages/piwik-pro-tag-manager-integration-pl_PL.po

    r1571169 r1605209  
    22msgstr ""
    33"Project-Id-Version: Piwik PRO Tag Manager Integration\n"
    4 "POT-Creation-Date: 2016-12-27 14:18+0100\n"
    5 "PO-Revision-Date: 2016-12-27 14:32+0100\n"
     4"POT-Creation-Date: 2017-02-27 17:17+0100\n"
     5"PO-Revision-Date: 2017-02-27 17:17+0100\n"
    66"Last-Translator: Piotr Niewiadomski <[email protected]>\n"
    77"Language-Team: Piwik PRO | Piotr Niewiadomski <[email protected]>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "X-Generator: Poedit 1.8.11\n"
     12"X-Generator: Poedit 1.8.12\n"
    1313"X-Poedit-Basepath: ..\n"
    1414"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
     
    1818"X-Poedit-SearchPath-0: .\n"
    1919
    20 #: includes/class-tag-manager.php:74 includes/class-tag-manager.php:349
    21 msgid "Settings"
    22 msgstr "Ustawienia"
    23 
    24 #: includes/class-tag-manager.php:93
     20#: framework/plugin.php:135
    2521msgid "Author"
    2622msgstr "Autor"
    2723
    28 #: includes/class-tag-manager.php:112 includes/class-tag-manager.php:116
    29 #: includes/class-tag-manager.php:139
    30 msgid "Piwik PRO Tag Manager integration"
    31 msgstr "Integracja Piwik PRO Tag Manager"
    32 
    33 #: includes/class-tag-manager.php:141
     24#: framework/plugin.php:150
     25msgid "Error"
     26msgstr "Błąd"
     27
     28#: framework/plugin.php:151
     29msgid "Class"
     30msgstr "Klasa"
     31
     32#: framework/plugin.php:152
     33msgid "Function"
     34msgstr "Funckja"
     35
     36#: framework/singleton.php:30 framework/singleton.php:33
     37#: framework/singleton.php:37
     38msgid "Cheatin&#8217; uh?"
     39msgstr "Oszukujemy, co?"
     40
     41#: includes/cron.php:67
     42msgid "interval"
     43msgstr "interwał"
     44
     45#: includes/files.php:92
     46msgid "Wrong response code"
     47msgstr "Błędny kod odpowiedzi"
     48
     49#: includes/section.php:107
     50#, php-format
     51msgid "Dir: %s does not exists!"
     52msgstr "Folder: %s nie istnieje!"
     53
     54#: includes/section.php:108
     55#, php-format
     56msgid "Dir: %s is not writable!"
     57msgstr "Folder: %s nie ma uprawnień do zapisu!"
     58
     59#: includes/section.php:109
     60#, php-format
     61msgid "Dir: %s is not readable!"
     62msgstr "Folder: %s nie ma uprawnień do odczytu!"
     63
     64#: includes/section.php:111
     65msgid "Server not supports URL rewriting."
     66msgstr "Serwer nie obsługuje przepisywania adresów."
     67
     68#: includes/section.php:122
    3469msgid "Server URL"
    3570msgstr "URL Serwera"
    3671
    37 #: includes/class-tag-manager.php:155 includes/class-tag-manager.php:175
     72#: includes/section.php:133 includes/section.php:150
    3873#, php-format
    3974msgid "Learn more about %s on the Piwik PRO Tag Manager documentation page."
    4075msgstr "Dowiedz się więcej o %s na stronie dokumentacji Piwik PRO Tag Manager."
    4176
    42 #: includes/class-tag-manager.php:156
     77#: includes/section.php:134
    4378msgid "Getting started"
    4479msgstr "Jak zacząć"
    4580
    46 #: includes/class-tag-manager.php:161
    47 msgid "Container ID"
    48 msgstr "ID Kontenera"
    49 
    50 #: includes/class-tag-manager.php:176
     81#: includes/section.php:139
     82msgid "Container UUID"
     83msgstr "UUID Kontenera"
     84
     85#: includes/section.php:151
    5186msgid "Containers"
    5287msgstr "Kontenerach"
    5388
    54 #: includes/class-tag-manager.php:181
    55 msgid "Include tags synchronous"
    56 msgstr "Umieść tagi synchronicznie"
    57 
    58 #: includes/class-tag-manager.php:194
    59 msgid "Preferred method"
    60 msgstr "Preferowana metoda"
    61 
    62 #: includes/class-tag-manager.php:209 includes/class-tag-manager.php:274
    63 msgid "Dependencies"
    64 msgstr "Zależności"
    65 
    66 #: includes/class-tag-manager.php:212 includes/class-tag-manager.php:277
    67 #, php-format
    68 msgid "Comma separated %s handles. Works only with %s method."
    69 msgstr ""
    70 "Rozdzielone przecinkami identyfikatory funkcji %s. Działa jedynie z metodą "
    71 "%s."
    72 
    73 #: includes/class-tag-manager.php:233
     89#: includes/section.php:156
     90msgid "Method"
     91msgstr "Metoda"
     92
     93#: includes/section.php:168
     94#, php-format
     95msgid "Paste the following code after %s tag in your theme: %s."
     96msgstr "Wklej następujący kod po znaczniku %s Twojego motywu: %s."
     97
     98#: includes/section.php:169
     99msgid "Preferred method."
     100msgstr "Preferowana metoda."
     101
     102#: includes/section.php:188
    74103#, php-format
    75104msgid ""
     
    80109"motywie."
    81110
    82 #: includes/class-tag-manager.php:234
     111#: includes/section.php:189
     112#, php-format
     113msgid "It will add snippet in %s section using %s."
     114msgstr "Skrypt zostanie dodany w sekcji %s przy użyciu %s."
     115
     116#: includes/section.php:197
     117msgid "Dependencies"
     118msgstr "Zależności"
     119
     120#: includes/section.php:208
     121#, php-format
     122msgid "Comma separated %s handles. Works only with %s method."
     123msgstr ""
     124"Rozdzielone przecinkami identyfikatory funkcji %s. Działa jedynie z metodą "
     125"%s."
     126
     127#: includes/section.php:215
     128msgid "Cache"
     129msgstr "Pamięć podręczna"
     130
     131#: includes/section.php:225 includes/section.php:337
     132msgid "enable/disable"
     133msgstr "włącz/wyłącz"
     134
     135#: includes/section.php:227
     136msgid "Use this option if you want to serve the script from a cached file"
     137msgstr "Użyj tej opcji jeśli chcesz serwować skrypt z pamięci podręcznej."
     138
     139#: includes/section.php:241
     140#, php-format
     141msgid "Preferred method is to disable %s and add a task to cron on the server."
     142msgstr ""
     143"Preferowaną metodą jest wyłączenie harmonogramu %s i dodanie zadania do "
     144"harmonogramu cron na serwerze."
     145
     146#: includes/section.php:246
     147msgid "Add the following constant to"
     148msgstr "Dodaj następującą stałą do"
     149
     150#: includes/section.php:251
     151msgid "Add the following task to your cron jobs"
     152msgstr "Dodaj następujące zadanie do harmonogramu cron"
     153
     154#: includes/section.php:265
     155msgid "minutes"
     156msgstr "minut"
     157
     158#: includes/section.php:267
     159msgid "Set refresh the cache interval."
     160msgstr "Ustaw interwał czasowy odświeżania pamięci podręcznej."
     161
     162#: includes/section.php:285
     163msgid "Add the following rules at the beginning of this file"
     164msgstr "Dodaj następujące reguły na początku pliku"
     165
     166#: includes/section.php:301
     167msgid "rewrite"
     168msgstr "przepisz"
     169
     170#: includes/section.php:303
     171msgid "Use this option if you want to rewrite the script's url to"
     172msgstr "Użyj tej opcji jeśli chcesz przepisać adres skryptu na"
     173
     174#: includes/section.php:319
     175msgid "clear"
     176msgstr "wyczyść"
     177
     178#: includes/section.php:321
     179msgid "Delete all the cached files and directories from"
     180msgstr "Usuń wszystkie pliki i foldery z pamięci podręcznej"
     181
     182#: includes/section.php:327
     183msgid "Version"
     184msgstr "Wersia"
     185
     186#: includes/section.php:339
    83187#, php-format
    84188msgid ""
    85 "It will add the Piwik PRO Tag Manager snippet directly before the %s tag "
    86 "using %s."
    87 msgstr ""
    88 "Spowoduje to dodanie skryptu Piwik PRO Tag Manager bezpośrednio przed "
    89 "znacznikiem %s za pomocą %s."
    90 
    91 #: includes/class-tag-manager.php:242
    92 msgid "Include tags asynchronous"
    93 msgstr "Umieść tagi asynchronicznie"
    94 
    95 #: includes/class-tag-manager.php:256
    96 #, php-format
    97 msgid ""
    98 "Add the following code directly after the %s tag in your theme (preferred "
    99 "method)"
    100 msgstr ""
    101 "Dodaj poniższy kod bezpośrednio po znaczniku %s w swoim motywie (preferowana "
    102 "metoda)"
    103 
    104 #: includes/class-tag-manager.php:298
    105 #, php-format
    106 msgid "Use this option if you cannot add the %s function to your theme."
    107 msgstr "Użyj tej opcji jeśli nie możesz dodać funkcji %s do swojego motywu."
    108 
    109 #: includes/class-tag-manager.php:299
    110 #, php-format
    111 msgid ""
    112 "It will add the Piwik PRO Tag Manager snippet directly after the %s tag "
    113 "using %s."
    114 msgstr ""
    115 "Spowoduje to dodanie skryptu Piwik PRO Tag Manager bezpośrednio po znaczniku "
    116 "%s za pomocą %s."
     189"Add the %s parameter in the query string for the scripts' url with the "
     190"timestamp."
     191msgstr "Dodaj parametr %s ze znacznikiem czasu do adresu url skryptu."
     192
     193#: includes/section.php:349 includes/settings.php:64
     194#, php-format
     195msgid "Include tags in %s section"
     196msgstr "Dodaj tagi do sekcji %s"
     197
     198#: includes/settings.php:48 includes/settings.php:51
     199msgid "Piwik PRO Tag Manager integration"
     200msgstr "Integracja Piwik PRO Tag Manager"
     201
     202#: includes/settings.php:69 includes/tag-manager.php:85
     203msgid "Settings"
     204msgstr "Ustawienia"
     205
     206#~ msgid "Container ID"
     207#~ msgstr "ID Kontenera"
     208
     209#~ msgid "Include tags synchronous"
     210#~ msgstr "Umieść tagi synchronicznie"
     211
     212#~ msgid "Preferred method"
     213#~ msgstr "Preferowana metoda"
     214
     215#~ msgid ""
     216#~ "It will add the Piwik PRO Tag Manager snippet directly before the %s tag "
     217#~ "using %s."
     218#~ msgstr ""
     219#~ "Spowoduje to dodanie skryptu Piwik PRO Tag Manager bezpośrednio przed "
     220#~ "znacznikiem %s za pomocą %s."
     221
     222#~ msgid "Include tags asynchronous"
     223#~ msgstr "Umieść tagi asynchronicznie"
     224
     225#~ msgid ""
     226#~ "Add the following code directly after the %s tag in your theme (preferred "
     227#~ "method)"
     228#~ msgstr ""
     229#~ "Dodaj poniższy kod bezpośrednio po znaczniku %s w swoim motywie "
     230#~ "(preferowana metoda)"
     231
     232#~ msgid "Use this option if you cannot add the %s function to your theme."
     233#~ msgstr "Użyj tej opcji jeśli nie możesz dodać funkcji %s do swojego motywu."
     234
     235#~ msgid ""
     236#~ "It will add the Piwik PRO Tag Manager snippet directly after the %s tag "
     237#~ "using %s."
     238#~ msgstr ""
     239#~ "Spowoduje to dodanie skryptu Piwik PRO Tag Manager bezpośrednio po "
     240#~ "znaczniku %s za pomocą %s."
    117241
    118242#~ msgid "7tag Settings"
  • piwik-pro-tag-manager-integration/trunk/plugin.php

    r1571169 r1605209  
    55    Plugin URI: https://wordpress.org/plugins/piwik-pro-tag-manager-integration
    66    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: 1.0.0
     7    Version: 2.0.0
    88    Author: piwikpro
    99    Author URI: https://piwik.pro
     
    3636
    3737use PiwikPRO\Tag_Manager;
     38use Exception;
    3839
    3940if ( ! defined( 'ABSPATH' ) ) {
     
    4546}
    4647
    47 foreach ( array( 'class-singleton.php', 'class-plugin.php', 'class-tag-manager.php', 'functions.php' ) as $file ) {
    48     require_once( plugin_dir_path( __FILE__ ) . 'includes/' . $file );
     48foreach ( array( 'singleton', 'filterer', 'plugin' ) as $file ) {
     49    require_once( __DIR__ . "/framework/$file.php" );
    4950}
    5051
    51 if ( ! has_action( Tag_Manager::get( 'slug' ) ) ) {
    52     do_action( Tag_Manager::get( 'slug' ), Tag_Manager::instance() );
     52foreach ( array( 'tag-manager', 'functions' ) as $file ) {
     53    require_once( __DIR__ . "/includes/$file.php" );
    5354}
     55
     56try {
     57    spl_autoload_register( __NAMESPACE__ . '::autoload' );
     58
     59    if ( ! has_action( __NAMESPACE__ ) ) {
     60        do_action( __NAMESPACE__, Tag_Manager::instance( __FILE__ ) );
     61    }
     62} catch ( Exception $exception ) {
     63    if ( WP_DEBUG && WP_DEBUG_DISPLAY ) {
     64        echo $exception->getMessage();
     65    }
     66}
  • piwik-pro-tag-manager-integration/trunk/templates/input.php

    r1571169 r1605209  
    22<label>
    33    <?php if ( ! empty( $before ) ) : ?><?= $before; ?><?php endif; ?>
    4     <input <?php if ( ! empty( $attrs ) ) : ?><?= $attrs; ?><?php endif; ?><?php if ( ! empty( $checked ) ) : ?> <?= $checked; ?><?php endif; ?>/>
     4    <input <?php if ( ! empty( $atts ) ) : ?><?= $atts; ?><?php endif; ?><?php if ( ! empty( $checked ) ) : ?> <?= $checked; ?><?php endif; ?>/>
    55    <?php if ( ! empty( $after ) ) : ?><?= $after; ?><?php endif; ?>
    66</label>
  • piwik-pro-tag-manager-integration/trunk/templates/menu.php

    r1571169 r1605209  
    11<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
    2 <div id="<?= $id; ?>" class="<?= $class; ?>"> <?= $content; ?></div>
     2<div class="<?= $class; ?>"> <?= $content; ?></div>
  • piwik-pro-tag-manager-integration/trunk/templates/page.php

    r1571169 r1605209  
    11<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
    22<div class="wrap">
     3    <h1><?= $title; ?></h1>
     4    <p><?= $content; ?></p>
     5    <h2 class="nav-tab-wrapper">
     6        <?php foreach( $sections as $tab => $label ) : ?>
     7            <a href="<?= $url; ?>&tab=<?= $tab; ?>" class="nav-tab<?= $tab === $section ? ' nav-tab-active' : ''; ?>"><?= $label; ?></a>
     8        <?php endforeach; ?>
     9    </h2>
    310    <form method="post" action="options.php">
    411        <?php
    5             settings_fields( $fields );
    6             do_settings_sections( $sections );
     12            settings_fields( $section );
     13            do_settings_sections( $section );
    714            submit_button();
    815        ?>
  • piwik-pro-tag-manager-integration/trunk/templates/section.php

    r1571169 r1605209  
    11<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
    2 <?php if ( ! empty( $content ) ) : ?>
    3     <p>
    4         <?= $content; ?>
    5     </p>
    6 <?php endif; ?>
     2<?php if ( ! empty( $content ) ) : ?><p><?= $content; ?></p><?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.