來自WP Google Analytics Events的設定
Click Tracking Selector: textellfooter, Selector Type: class, Event Category:TEXTELL
Event Action: clickTEXTELLfooter, Event Label: TEXTELLfooter_Label, Event Value: 10, Non-Interaction: false
Goal Tracker測試(TCNEWS.info) 不使用GTM4WP外掛 使用WPCode加入GTM(G-M6HMV2R3C5)
1. 先設定一個Event
Google cloud TCNEWS tcnews.info@gmail.com
https://console.cloud.google.com/apis/credentials
1. 設定OAuth 收信並回信給Google 告知同意繼續驗證 以驗證完成!!!
2. 憑證(注意: 已授權的重新導向 URI https://tcnews.info 網址最後不可有/ )
用戶端編號 1079657572624-jg5a5h1834dfnii0pkuciobe10j3314a.apps.googleusercontent.com
用戶端密鑰 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
憑證 URL導向改成https://tcnews.info/tcnewsgo 是否會成功?? 無效!
https://developers.line.biz/zh-hant/ teshin@msn.com (是使用googooku@gmail.com登入的??)
Channel ID: 2000146654 Channel secret: 10a403004a684ab640b2a0a2ad1698e5 LINE登入 Google成功!!
TEXTELL 標題與連結 for WORDPRESS
<p><a class="textell+article" href="https://www.youtube.com/c/textell" target="_blank" rel="noopener"><img class="textell+article alignleft" src="https://www.tcfm.fju.edu.tw/1_TCFMIMG/textell_logo.png" alt="TEXTELL" width="388" height="116" border="0" /></a></p>
小工具footer
<a class="tcnews-vol-43" href="https://tcnews.info/tcnews-vol-43/" target="_blank" rel="noopener"><img src="https://tcnews.info/tcnewsphotos/COVERS/TCNEWS_vol43_cover.jpg" alt="TCNEWS_VOL.42" border="0" /></a>
二次建站 換新資料庫
DB:tcnews3 tcscopec_tcnews3
USER:tcscopec_tcnews pass:changed
FTP USER: tcnews@tcnews.info(tcftp123456)
THEME:新布景MAGBOOK
TCNEWS官網後台網址:https://tcnews.info/tcnewsgo
TCNEWS管理者:tcadminer tkp6xxtkp6x (3個2個) admin@tcscope.com
TCNEWS編輯與管理員 ADMIN: tcadminer (admin@tcscope.com) tkp6xxtkp6x
TCNEWS編輯平台 https://editor.tcnews.info
(1) 官網編輯帳密資訊
TCNEWS官網後台網址:https://tcnews.info/tcnewsgo
後台使用者1 帳:iamtcnewseditor / 密:TcnewsistheBestOne
後台使用者2 帳:iamtcnewsreporter / 密:TcnewsSimplytheBestOne
後臺管理者 帳號:tcnewseic / 密碼: Iamcie@TCNEWS+301
(2)FTP TCNEWS相片管理員 (FTP軟體下載連結如編輯平台)
FTP 主機: ftp.tcscope.com
FTP使用者: photomanager@tcnews.info
FTP密碼: tcnewsisthebest
#FIFU特色相片與內文相片完整路徑資訊: https://tcnews.info/tcnewsphotos/vol43 (vol43為各期期數)
#內文程式碼:<img src="../tcnewsphotos/vol43/v43_0501.jpg" />
#使用FIFU以及 img src程式碼,建立根目錄照片資料夾(/public_html/tcnews.info/tcnewsphotos),以FTP上傳檔案。
editor@tcnews.info / reporter@tcnews.info
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#FIFU主要圖片大小不一的修正
#切換到 FIFU的設定 選Metadata 先關Clean Metadata 為OFF
然後Image Metadata 會被關掉再ON
TCNEWS Sitemap提交給Google Search Console
https://tcnews.info/sitemap_index.xml
Google Search Console驗證 TCNEWS.info擁有權
TCSCOPEC ZONE EDITOR/ tcnews.info > MANAGE 加入一個TXT紀錄即可 第一欄填 tcnews.info
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
TCNEWS增加記憶體
根目錄下的wp-config.php
* 將此設定為 true 將可開啟開發時的通知顯示。
* 強烈建議外掛與佈景主題開發人員使用 WP_DEBUG
* 於他們的開發環境中。
*/
define('WP_DEBUG', false);
define( 'WP_MEMORY_LIMIT', '96M' ); (第210行,記得最後加;)
/* 設定完成,請儲存檔案。然後開始 Blogging 吧! */
更新主題版本時,要更新兩個檔案:/wp-content/theme/magbook/header.php & footer.php
=== [加入Google Tag Manager] MAGBOOK ===== GTM-TP4SX6
裝在header.php GA 資源修改為https://
最新更新時間 20180928。無使用外掛,直接TAG MANAGER代碼加入。 共4個TAG
FB HELP PIXEL 2個: Pixel ID: 1504481026525164 PageView Microdata Automatically Detected
Tag Assistant: 3個
1.Google Analytics UA-44140009-12 2.Google Tag Manager GTM-TP4SX6 3.Remarketing Tag 966262913
GTM
Paste this code as high in the <head> of the page as possible:
<!-- Google Tag Manager -->
<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],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TP4SX6');</script>
<!-- End Google Tag Manager -->
Additionally, paste this code immediately after the opening <body> tag:
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TP4SX6"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
TCNEWS MAGBOOK footer.php
地69行 修正文字與網址。
<?php esc_html_e('Implementation and Operations by: ','magbook'); ?> <a title="<?php echo esc_attr__( 'TCNEWS', 'FJU Textiles and Clothng' ); ?>" target="_blank" href="<?php echo esc_url( 'https://tcnews.info' ); ?>"><?php esc_html_e('TCNEWS.info','magbook');?></a> |
<?php date_i18n(__('Y','magbook')) ; ?> <a title="<?php echo esc_attr__( 'WordPress', 'magbook' );?>" target="_blank" href="<?php echo esc_url( 'http://www.tc.fju.edu.tw' );?>"><?php esc_html_e('FJU Textiles and Clothng','magbook'); ?></a> | <?php echo '© ' . esc_attr__('Copyright All right reserved ','magbook'); ?>
</div>
外觀 / 自訂 / Top Header info > 自訂HTML
<ul>
<li><a title="Call Us" href="https://www.facebook.com/TCNEWs/" target="_blank"><i class="fa fa-facebook-square"></i> TCNEWS </a></li>
<li><a title="Mail Us" href="mailto:077637@mail.fju.edu.tw"><i class="fa fa-envelope-o"></i> 077637@mail.fju.edu.tw</a></li>
</ul>
小工具 頁尾 footer 自訂HTML
TCNEWS VOL.28
<a href="https://tcnews.info/tcnews-vol-28/" target="_blank"><img src="https://tcnews.info/tcnewsphotos/COVERS/TCNEWS_V28_COVER_715x1011.jpg" alt="TCNEWS VOL.28"></a>
保留 uploads內的資料。TCNEWS.info/AAA 以及 TCNEWS_UPLOAD。
WP super cache 外掛出問題
修正根目錄 wp-config.php 第一行super cache 錯誤資訊拿掉
TCNEWS.info 自訂CSS (20210511)
/* CSS01 */@import url(https://fonts.googleapis.com/earlyaccess/cwtexhei.css);@import url(https://fonts.googleapis.com/earlyaccess/cwTeXMing.css);@import url('https://fonts.googleapis.com/css?family=Oswald');@import url('https://fonts.googleapis.com/css?family=Cinzel+Decorative');@import url('https://fonts.googleapis.com/css?family=Nixie+One');@import url('https://fonts.googleapis.com/css?family=Tenor+Sans');TCNEWS LOGO
紅202 綠38 藍27 HEX #CA261B
FB HELP PIXEL 2個: Pixel ID: 1504481026525164 PageView Microdata Automatically Detected
Tag Assistant: 3個
1.Google Analytics UA-44140009-12 2.Google Tag Manager GTM-TP4SX6 3.Remarketing Tag 966262913
:::::::::::::::::::GA事件的設定::::::::::::::::::::::::::
<p>
<a href="http://tcnews.info/wp-content/uploads/TCNEWS_VOL22.pdf" target="_blank" onClick="ga('send,'event','超連結','點擊','v22完整版下載1','2');"><img alt="TCNEWS-織品服裝電子報-第22期" class="alignnone size-medium wp-image-2352" src="http://tcnews.info/wp-content/uploads/V22_COVER_715x1012-707x1000.png" style="width: 100px; height: 141px;" /></a>
所有程式碼皆無效。
改用外掛 WordPress超好用的Google Analytics事件追蹤外掛
(1) WP Google Analytics Events https://tw.wordpress.org/plugins/wp-google-analytics-events/
先輸入 GA追蹤代號 Universal 打勾。要追蹤的對象需要有CSS class。
例如放一張圖片,該圖本身有CLASS,但是需要在編輯文章時,針對該圖片雙按,進入圖片編輯,進階設定,下拉到Advanced Link Setting,給一個新的CSS class。才可以使用該css class至外掛設定中加入class。
一般文字連結沒有class。
<a class=”gtrack” href=”http://www.wordpress.org”>WordPress</a>
(2)Gravitate Event Tracking for Google Analytics
功能為某個網址被按都會記錄下來,沒有分在哪個頁面按。例如: TCNEWS的首頁,或TCNEWS FULL這個分類,只要點到無論由選單或文章內,都會記錄該事件一次。
Add Custom Event
Selector / Element 設為一個固定的網址 a[href="http://tcnews.info/category/tcnews-full/"] 其他則皆可輸入 方便判別即可。
也可 a[href^="http://tcnews.info/"] ^所指為以某段網址開頭的網頁全監控。
a[href$=" .PDF"] $以某段類型或網址結尾的全監控。
a[href$="/pass/kansai_wide/"]",代表結尾為"/pass/kansai_wide/"的連結被點擊時會觸發這個事件追蹤。
Gravitate Event Tracking for Google Analytics 可監控的對象更多!! 但無法區別來源。
>>>>>
安裝外掛以後 (不須設定目標) 文章內的也都可以動了!! 不確定是哪個外掛的原因。
安裝順序:先裝外掛WP Google Analytics Events ;再裝Gravitate Event Tracking for Google Analytics
放在小工具的手動程式碼可用:
<a onClick="ga('send','event','HOMELINK','theClicks','TCNEWSHOME');" href="http://tcnews.info">TCNEWS</a>
文章內的也都可以動了!!
<a href="http://tcnews.info/category/issue/" onClick="ga('send','event','回到分類','點擊','到熱門話題','2');">回到熱門話題</a>
<a onClick="ga('send','event','POSTLINK','PostClicks','POST2SHOME');" href="http://tcnews.info">TCNEWS</a>
一般連結的事件監控也不需設class了。自行設程式碼可加入事件的價值。
結論:先安裝外掛,可測試自行程式碼的效果,以辦別是哪個外掛所產生的正常顯示效果。
Category Action Label Value
TCNEWSFull頁面 TCNEWSfull Side Click Click to TCNEWS_Side (程式碼)
設定:首頁右欄
TCNEWSFull頁面 TCNEWSfull Click TCNEWS Click_to_{TCNEWSFull} (Gravitate)
設定:外掛監控連至TCNEWSfull頁面的所有來源。
各期全文頁面 Link to TCNEWS Post Click Click to v21_title-of-post (程式碼)
設定:
TCNEWS PDF檔案 Download PDF Post to v21 pdf v21_pdf_title-of-post (WP GA E.)
設定:WP GA Event 外掛,封面圖直接點進pdf,由Label區別是哪篇文章帶來下載。
TCNEWS PDF檔案 Download PDF Downloaded Download_{TCNEWS_PDF}
設定:外掛監控所有PDF Gravitate (無法區分來源;來源由上述外掛監控。)
TCNEWS Online網站 Link to issuu v22 Post to Online Post to issuu 22 (程式碼)
設定:
TCNEWS Online網站 Link to issuu Link to Online issuu form v22(各期頁面) (程式碼)
設定:v22下載頁(或各期下載頁) 針對ISSUU連結文字與logo進行設定,由Label標籤區別來源。
ex1. onClick="ga('send','event','Lint to issuu','Link to Online','issuu from v22','2');"
ex2. onClick="ga('send','event','Lint to issuu','Link to Online','issuu from v22-logo','2');"
'回到分類' '點擊' '到熱門話題' (程式碼)
保留 uploads內的資料。TCNEWS.info/AAA 以及 TCNEWS_UPLOAD。
自訂HTML (連PDF檔案 懂織)
<a href="https://tcnews.info/tctc/%E6%87%82%E7%B9%94_VOL01.pdf" target="_blank" class="tctc"><img src="https://tcnews.info/tcnewsphotos/tctc/tctc_vol01_cover.png" alt="TCTC" border="0"></a>
圖片 (選用圖片 指定連結)
文字 <a class="tcnews-vol-42" href="https://tcnews.info/tcnews-vol-42/" target="_blank" rel="noopener"><img src="https://tcnews.info/tcnewsphotos/COVERS/TCNEWS_vol42_cover.jpg" alt="TCNEWS_VOL.42" border="0" /></a>
TEXTELL的連結
<a href="https://www.youtube.com/c/textell" target="_blank" class="textellfooter"><img src="https://www.tcfm.fju.edu.tw/1_TCFMIMG/textell_logo.png" alt="TEXTELL" border="0"></a>
更改Class 為 放置到文章中
<a href="https://www.youtube.com/c/textell" target="_blank" class="textell+article"><img src="https://www.tcfm.fju.edu.tw/1_TCFMIMG/textell_logo.png" alt="TEXTELL" border="0"></a>
自訂HTML (ISSUU 版面直接連結)
<iframe src="https://e.issuu.com/anonymous-embed.html?u=tcnews.info&d=vol.41&p=1"
style="border:none;width:100%;height:500px;" allowfullscreen></iframe>
<iframe src="https://e.issuu.com/anonymous-embed.html?u=tcnews.info&d=vol.40&p=1"
style="border:none;width:100%;height:500px;" allowfullscreen></iframe>
$P$Bba1jbibH0p5jbRGAg5G/Pd538UuSK/
user activation ley: 1538099328:$P$BiWuTS9t23J6ln3Jy6mxXuaO2GSmzy0