Commit 5e912bb1 authored by Simonas's avatar Simonas

tag manager & workflow update

parent 7a2bd64d
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
## Production ## Production
- build CSS & JS assets - `C:\web\dev.biuro\ npm run build` - build CSS & JS assets - `C:\web\dev.biuro\ npm run build`
- build new image `docker build -t biuro/web:1.2.0 .` (update version number) - build new image `docker build -t biuro/web:1.2.1 .` (update version number)
- login to biuro docker account `docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs` - login to biuro docker account `docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs`
- push image to docker repository - `docker push biuro/web:1.2.0` - push image to docker repository - `docker push biuro/web:1.2.0`
......
...@@ -161,28 +161,29 @@ services: ...@@ -161,28 +161,29 @@ services:
# wp option update timezone_string "Manual Offsets/UTC+2"; # wp option update timezone_string "Manual Offsets/UTC+2";
# wp option update date_format "Y-m-d"; # wp option update date_format "Y-m-d";
# wp option update time_format "H:i"; # wp option update time_format "H:i";
wp plugin install loco-translate --version=2.3.0 --activate-network;
wp plugin install pods --version=2.7.12 --activate-network; # wp plugin install loco-translate --version=2.3.0 --activate-network;
wp plugin install polylang --version=2.5.4 --activate-network; # wp plugin install pods --version=2.7.12 --activate-network;
wp plugin install wordpress-seo --version=11.3 --activate-network; # wp plugin install polylang --version=2.5.4 --activate-network;
# wp plugin install wordpress-seo --version=11.3 --activate-network;
wp plugin update akismet --version=4.1.2; wp plugin update akismet --version=4.1.2;
wp plugin update hello --version=1.7.2; wp plugin update hello --version=1.7.2;
wp plugin activate akismet --network; # wp plugin activate akismet --network;
wp plugin activate biuro-contacts --network; # wp plugin activate biuro-contacts --network;
wp plugin activate biuro-feedbacks --network; # wp plugin activate biuro-feedbacks --network;
wp plugin activate biuro-html --network; # wp plugin activate biuro-html --network;
wp plugin activate biuro-sections --network; # wp plugin activate biuro-sections --network;
wp plugin activate biuro-services --network; # wp plugin activate biuro-services --network;
wp plugin activate biuro-values --network; # wp plugin activate biuro-values --network;
wp plugin activate cookies-warning --network; # wp plugin activate cookies-warning --network;
wp plugin activate data-controller --network; # wp plugin activate data-controller --network;
wp plugin activate jobs-importer --network; # wp plugin activate jobs-importer --network;
wp theme update --all; # wp theme update --all;
wp theme activate biuro; # wp theme activate biuro;
wp language core update; wp language core update;
wp language theme update --all; # wp language theme update --all;
wp language plugin update --all; # wp language plugin update --all;
echo "WP CLI done. Ready to use."; echo "WP CLI done. Ready to use.";
' '
......
...@@ -280,13 +280,26 @@ fi ...@@ -280,13 +280,26 @@ fi
chown $WEB_USER:$WEB_USER $ROOT_DIR/wp-content chown $WEB_USER:$WEB_USER $ROOT_DIR/wp-content
chown -R $WEB_USER:$WEB_USER $ROOT_DIR/wp-content/uploads chown -R $WEB_USER:$WEB_USER $ROOT_DIR/wp-content/uploads
WP_PLUGINS_DIR=$ROOT_DIR/wordpress/wp-content/plugins
CONTENT_DIR=$ROOT_DIR/wp-content CONTENT_DIR=$ROOT_DIR/wp-content
THEME_DIR=$CONTENT_DIR/themes THEME_DIR=$CONTENT_DIR/themes
PLUGIN_DIR=$CONTENT_DIR/plugins PLUGIN_DIR=$CONTENT_DIR/plugins
UPLOADS_DIR=$CONTENT_DIR/uploads UPLOADS_DIR=$CONTENT_DIR/uploads
PLUGIN_LOCO_DIR=$WP_PLUGINS_DIR/loco-translate
PLUGIN_PODS_DIR=$WP_PLUGINS_DIR/pods
PLUGIN_POLY_DIR=$WP_PLUGINS_DIR/polylang
PLUGIN_SEO_DIR=$WP_PLUGINS_DIR/wordpress-seo
cp -r /temp/themes/* $THEME_DIR || true cp -r /temp/themes/* $THEME_DIR || true
cp -r /temp/plugins/* $PLUGIN_DIR || true cp -r /temp/plugins/* $PLUGIN_DIR || true
cp -r /temp/plugins/loco-translate* $PLUGIN_LOCO_DIR || true
cp -r /temp/plugins/pods* $PLUGIN_PODS_DIR || true
cp -r /temp/plugins/polylang* $PLUGIN_POLY_DIR || true
cp -r /temp/plugins/wordpress-seo* $PLUGIN_SEO_DIR || true
cp -r /temp/uploads/* $UPLOADS_DIR || true cp -r /temp/uploads/* $UPLOADS_DIR || true
cp -r /temp/content/* $ROOT_DIR || true cp -r /temp/content/* $ROOT_DIR || true
......
...@@ -22,6 +22,8 @@ location ^~ /wp-content/uploads/additional/ { ...@@ -22,6 +22,8 @@ location ^~ /wp-content/uploads/additional/ {
# 301 biuro.ee redirects # 301 biuro.ee redirects
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
rewrite ^/admin/?$ /wp-login.php permanent;
# Biuro SEO issues # Biuro SEO issues
# https://docs.google.com/spreadsheets/d/1dXP0dh_v2sFajrcwR2_9HONMadCdZQW4Y2dVXvhxG3E/edit?ts=5b5eaa6b#gid=0 # https://docs.google.com/spreadsheets/d/1dXP0dh_v2sFajrcwR2_9HONMadCdZQW4Y2dVXvhxG3E/edit?ts=5b5eaa6b#gid=0
# https://docs.google.com/spreadsheets/d/1wFz9wrCsPOwCm0R0NnrImhUMFlF35Y4-vCOL7fyZpmI/edit#gid=280898487 # https://docs.google.com/spreadsheets/d/1wFz9wrCsPOwCm0R0NnrImhUMFlF35Y4-vCOL7fyZpmI/edit#gid=280898487
......
...@@ -22,6 +22,8 @@ location ^~ /wp-content/uploads/additional/ { ...@@ -22,6 +22,8 @@ location ^~ /wp-content/uploads/additional/ {
# 301 biuro.lt redirects # 301 biuro.lt redirects
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
rewrite ^/admin/?$ /wp-login.php permanent;
# rewrite ^/darbo-pasiulymai$ / permanent; # rewrite ^/darbo-pasiulymai$ / permanent;
# rewrite ^/darbo-pasiulymai/(.*)$ /? permanent; # rewrite ^/darbo-pasiulymai/(.*)$ /? permanent;
......
...@@ -22,6 +22,8 @@ location ^~ /wp-content/uploads/additional/ { ...@@ -22,6 +22,8 @@ location ^~ /wp-content/uploads/additional/ {
# 301 biuro.lv redirects # 301 biuro.lv redirects
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
rewrite ^/admin/?$ /wp-login.php permanent;
# Biuro SEO issues # Biuro SEO issues
# https://docs.google.com/spreadsheets/d/1dXP0dh_v2sFajrcwR2_9HONMadCdZQW4Y2dVXvhxG3E/edit?ts=5b5eaa6b#gid=0 # https://docs.google.com/spreadsheets/d/1dXP0dh_v2sFajrcwR2_9HONMadCdZQW4Y2dVXvhxG3E/edit?ts=5b5eaa6b#gid=0
# https://docs.google.com/spreadsheets/d/1wFz9wrCsPOwCm0R0NnrImhUMFlF35Y4-vCOL7fyZpmI/edit#gid=0 # https://docs.google.com/spreadsheets/d/1wFz9wrCsPOwCm0R0NnrImhUMFlF35Y4-vCOL7fyZpmI/edit#gid=0
......
...@@ -31,14 +31,17 @@ ...@@ -31,14 +31,17 @@
$blogID = get_current_blog_id(); $blogID = get_current_blog_id();
$tagManager = 'GTM-THF42F';
$facebook_site = 'https://www.facebook.com/biuro.lietuva'; $facebook_site = 'https://www.facebook.com/biuro.lietuva';
$linkedin_site = 'http://www.linkedin.com/company/2824948'; $linkedin_site = 'http://www.linkedin.com/company/2824948';
if ($blogID == 2): if ($blogID == 2):
$tagManager = 'GTM-5LX4QZ';
$facebook_site = 'https://www.facebook.com/biuro.lv'; $facebook_site = 'https://www.facebook.com/biuro.lv';
endif; endif;
if ($blogID == 3): if ($blogID == 3):
$tagManager = 'GTM-MLLVP2';
$facebook_site = 'https://www.facebook.com/biuro.ee'; $facebook_site = 'https://www.facebook.com/biuro.ee';
endif; endif;
?> ?>
...@@ -74,21 +77,21 @@ ...@@ -74,21 +77,21 @@
<?php <?php
if (!in_array(strstr($_SERVER['SERVER_NAME'], '.biuro', true), array('dev', 'staging'))): if (!in_array(strstr($_SERVER['SERVER_NAME'], '.biuro', true), array('dev', 'staging'))):
?> ?>
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-THF42F" <noscript><iframe src="//www.googletagmanager.com/ns.html?id=<?php echo $tagManager; ?>"height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-THF42F');</script> })(window,document,'script','dataLayer','<?php echo $tagManager; ?>');</script>
<?php <?php
endif; endif;
?> ?>
<script src="/wp-content/themes/biuro/js/main-5fe88314.min.js" async></script> <script src="/wp-content/themes/biuro/js/main-3a215a69.min.js" async></script>
<?php <?php
// global $time_start; // global $time_start;
......
...@@ -433,3 +433,15 @@ if (document.querySelector('.js-copy-to-clipboard')) { ...@@ -433,3 +433,15 @@ if (document.querySelector('.js-copy-to-clipboard')) {
} }
} }
})(window); })(window);
(global => {
document.querySelectorAll('.gtm-share-click').forEach((node) => {
node.addEventListener('click', (e) => {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'shareClick',
'shareLabel': node.dataset.label || ''
});
});
});
})(window);
...@@ -56,13 +56,13 @@ ...@@ -56,13 +56,13 @@
</a> </a>
*/ */
?> ?>
<a href="<?php echo $mailto; ?>" class="c-share--option c-share--option-email"> <a href="<?php echo $mailto; ?>" class="gtm-share-click c-share--option c-share--option-email" data-label="Email">
<svg width="17px" height="13px" class="c-ico--share-email"> <svg width="17px" height="13px" class="c-ico--share-email">
<use xlink:href="#ico--job-email"></use> <use xlink:href="#ico--job-email"></use>
</svg> </svg>
</a> </a>
<a href="#" class="js-copy-to-clipboard c-share--option c-share--option-copy"> <a href="#" class="js-copy-to-clipboard gtm-share-click c-share--option c-share--option-copy" data-label="Copy">
<svg width="15px" height="18px" class="c-ico--share-copy"> <svg width="15px" height="18px" class="c-ico--share-copy">
<use xlink:href="#ico--job-copy"></use> <use xlink:href="#ico--job-copy"></use>
</svg> </svg>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment