助理技術文件
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    ###### tags: `埋追蹤碼`、`GTM` # 埋追蹤碼 ## 索引 - 建立GTM容器code(目前為優化師負責) - [埋容器code](#埋容器code) - [透過GTM埋設追蹤碼](#透過GTM埋設追蹤碼) - [注意事項](#注意事項) - [追蹤碼類型](#追蹤碼類型) - [感謝頁](#感謝頁) - [追蹤碼範例檔案](#追蹤碼範例檔案) ## 埋容器code 從GTM取得容器2段code,將code放在html檔指定位置(1段置於<head>中,另1段置於<body> 開頭代碼正後方。) 1. 給客戶容器code檔案,請客戶自行埋設 2. 幫客戶埋容器code: 1.請客戶開啟後台(如wordpress) 2.請客戶給html檔 3.con-call --- ## 透過GTM埋設追蹤碼 1. 從Monday,或信件獲得需埋設的code、GTM帳號、客戶網址 2. 整理code,將PV、同事件不同平台的code整理好分檔案 3. 整理同時可以檢查code有沒有問題(如yahoo 的pixelid 應該要一樣,不同的是'ea'的事件名稱) 4. 如果有監測表單傳送,要另外加上檢查表單有無填寫(視情況) 5. 進GTM工作區→代碼→新增→命名代碼、代碼設定(自訂HTML→將pv或追蹤碼貼上→選擇觸發條件)→儲存 6. 觸發條件選擇類型(如點擊)、變數、條件(可用css選擇器,到網頁開開發者模式點copy selector,再把路徑貼到GTM) 7. 儲存後用預覽檢查電腦版與手機板是否都有觸發 8. 確認後按提交發布,命名Click Force_V幾 9. 去原網址做最後檢查 10. 確認內容無誤後,截圖上傳到Monday,並寫上測試結果(依以下格式) > 格式範例: 需求: 客戶需要請我們埋設追蹤碼+檢查 客戶名稱: 網站: 埋設平台: 埋設方式: 客戶開放GTM權限讓我方埋設+檢查是否成功觸發 埋設code: PV、事件*6( 1. 送出表單-CFsubmit 2. 撥打電話-CFtel 3. 線上諮詢-CFmessanger 4. 前往粉專-CFfb 5. 了解更多-CFinfo 6. google地圖-CFmap) GTM: clickforce04@gmail.com GTM-5H85KFS Code檔案: 2022/09/28 吉美富徠完成埋設且已發布 檢查結果: PV DSP、DMP、GA、FB、Google ads成功觸發 電腦版 DSP DMP GA Google Ads FB 手機版 DSP DMP GA Google Ads FB ---------------------------------------------- 事件:1. 送出表單-CFsubmit MF、GA、Google Ads、FB成功觸發 電腦版 DSP DMP GA Google Ads FB 手機版 DSP DMP GA Google Ads FB ---------------------------------------------- 詳細補充 --- ## 注意事項 1.追蹤碼類型: * MF(Click Force, DSP): 查碼rtid('id'),沒有事件名稱,要看id辨別 * MF(Click Force, DMP): 查碼analytic;cft("setSiteId", "CF-220500115299");,有事件名稱,有viewPercentage * GA(Google Analytics): 查碼UA-9碼-1碼,有事件名稱 * GA4(Google Analytics4): 查碼G-HN26ESRV15,有事件名稱(但會帶在pv一連串網址中),重要: script 和 code要放在GA後面,以免GA pv觸發兩次,或GA4 感謝頁無法觸發,如有任何問題可以試著移動一下順序 * Google Ads: 查碼AW-11碼+一串事件碼,沒有事件名稱,除pv外,事件在Network會出現4項搜尋結果 * FB: fbq('事件名稱', '查碼15碼') * Line: 查碼_lt('send', 'cv'/'pv', {type: '事件名稱'},['追蹤碼-不同事件也是一樣的']); * Yahoo: { 'projectId': '查碼:所有事件都一樣', 'properties': { 'pixelId': '查碼:所有事件都一樣-不一樣要反映', 'qstrings': { 'et': 'custom', 'ea':'事件名稱-應該每個都不一樣' } * DV360: 查碼DC-8碼,PV沒有名稱 2.感謝頁(兩種出現方式) 1. 出現新的div: 有些閱覽條件(如填完表單後出現的div),不能使用GTM提供的瀏覽和DOM事件(因為一網頁載入完就監測了,此時可以手動用function將監測code寫在上一個動作裡 2. 跳轉新頁面: 1. 使用閱覽網頁,選擇部分閱覽包含或等於特定網址 2. 追蹤碼要再附上pv code裡的連結(因為如果感謝頁code先執行,會找不到連結script而無法執行) #### 以MF為例,需要再放置以下連結 ```html= <script src="https://cdn.holmesmind.com/js/rtid.js"></script> <script src="https://cdn.holmesmind.com/dmp/cft/triggerTracker.js"></script> <script async src="https://cdn.holmesmind.com/dmp/cft/tracker.js"></script> ``` 3.追蹤碼範例檔案: https://drive.google.com/file/d/1MMb7h_MfzsbOsg7PLAJ9RieMiTK_dDcE/view?usp=sharing

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully