[WordPress] 外掛分享: Loyalty.js

首頁外掛目錄 › Loyalty.js
全新外掛
安裝啟用
★★★★★
5/5 分(4 則評價)
4069 天前
最後更新
問題解決
WordPress 3.0.1+ v2.0.2 上架:2014-10-27

內容簡介

Loyalty.js是什麼?

Loyalty js是一個輕量級jQuery外掛程式,用於追蹤使用者訪問您的網站次數,並基於此次數,為不同的用戶提供不同的體驗。您可以通過將data-attribute標籤添加到DOM元素來控制其行為。現在,您不再需要讓所有用戶同時看到相同內容的內容輪換,而是可以讓內容開始講述故事,並隨著用戶變得更加參與而不斷發展。

這是什麼意思?

想像一下,您是一家科技公司,在網站上擁有多個項目案例研究。現在,您可以做到以下兩點...

1)展示最好的案例研究。這很好,因為人們會首先看到它,但是第3、8、12次再次訪問您的網站的人可能仍會看到它。當然,您有號召行動的措施,使他們可以深入挖掘並探索您的內容,但從本質上講,您的登陸頁面對其毫無意義。

這會讓人們做出以下選擇...

2)改變它們的內容。他們想要使其保持“新鮮”。這裡的問題是,很多人可能會訪問您的網站,他們可能永遠不會發現您的最喜歡的內容。每個用戶,不論他們訪問過幾次,看到的都是相同的內容。這感覺就像在閱讀一個故事並強制讓來遲的人加入中間一樣。“最新”的不總是介紹您的品牌給第一次訪問者最相關的方式。

有了loyalty.js,您可以根據用戶訪問您的網站次數來指定體驗,而不是根據“SEO友好內容更新”的人工時間表。

WordPress 使用方法

這個 WordPress 外掛程式帶有一個短代碼,它允許您在內容編輯器代碼中使用loyalty.js標籤。短代碼為一個封閉標籤。

[loyalty min=”3″ max=”4″]Your Content[/loyalty]

外掛程式將優先考慮min和max。如果您希望內容在一個特定的遊覽次數顯示,請僅使用exact參數。

[loyalty exact=”6″]This content will show on visit #6[/loyalty]

還有一個短程式碼,允許您在網頁中打印訪問次數。只需在您的文章內容中添加[loyalty_count],Loyalty.js就會以帶有css類“loyaltyjs_count”和數據屬性“data-loyalty-count”的span標籤呈現。當它運行時,該外掛程式會填補整數值。

高級實現

如果您想更進一步,可以手動將data-attribute標籤添加到您的代碼中。請在GitHub頁面上閱讀有關文檔。https://github.com/eisenivan/loyalty

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.0.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Loyalty.js」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

What is Loyalty.js?
Loyalty js is a lightweight jQuery plugin that keeps track of how many times a user has come to your web property and allows you to craft a different experience based on that count. You can control the behavior by adding data-attribute tags to your DOM elements. Now, rather than having content rotate for every user at the same time, you will be able to “tell a story” that always starts at the beginning and progresses as a user becomes more engaged.
What does that mean?
Imagine you are a technology company with multiple project case studies on your site. As it stands now you can either…
1) Show your best case study first. This is great because people will see it first, but people that are returning to your site for the 3rd, 8th, 12th time still see it. Sure, you have calls to action that allow them to dig deeper and explore your content, but in essence, your landing page is no longer relevant to them. It is a wasted opportunity.
This leads people to…
2) Change up their content. They want to keep it “fresh”. The problem here is that a lot of people will come to your site that may never discover your favorite piece. Every user, regardless of how many times they have come see the same content. This feels like the equivilant of reading a story and forcing people that arrive late to join in the middle. What is “newest” is not always the most relevant way to introduce a first time visitor to your brand.
With loyalty.js you can dictate an experience that is based on how many times the user has visited your site, not an artificial timeline driven by “SEO Friendly Content Updates”.
WordPress Usage
This wordpress plugin comes complete with a shortcode that allows you to use loyalty.js tags in your content editor code. The shortcode is an enclosing tag.
[loyalty min=”3″ max=”4″]Your Content[/loyalty]
The plugin will honor min and max first. If you want the content to display at one specific view count, use ONLY the exact parameter.
[loyalty exact=”6″]This content will show on visit #6[/loyalty]
There is also a shortcode that allows you to print the number of views to the page. Simply add [loyalty_count] to your post content and Loyalty.js will render in a span tag with the css class of ‘loyaltyjs_count’ and the data-attribut ‘data-loyalty-count’. When it runs the plugin will fill in the integer value.
Advanced Implementation
If you would like to roll up your sleeves a little farther you can manually add data-attribute tage into your code. Please read the documentation on the GitHub page. https://github.com/eisenivan/loyalty

延伸相關外掛

文章
Filter
Mastodon