Documentation
¶
Overview ¶
Package linkrule is the one rule for which of an email's links are tracked (review AN-5). The sending engine numbers and redirects the links it picks; the report's click map draws its bubbles on the links Mark picks with the same rule and numbers the same way, so a bubble is always on the link its clicks came from.
Index ¶
Constants ¶
const Attr = "data-rc-link"
Attr is the attribute Mark adds to each tracked link: its position.
Variables ¶
This section is empty.
Functions ¶
func Label ¶
Label is a link's text: its inner HTML without tags, on one line, at most 120 characters.
func Mark ¶
Mark adds Attr with its position to each tracked link of src, numbered as the engine numbers the links of the same email: the links that blocks rendering per reader add (a referral block's) are counted where the block is, though the block stays as written.
func Rows ¶
Rows finds the tracked links of src that sit on one line with nothing but separators between them (a navigation bar: "Blog · Docs · Changelog"), as runs of at least two positions, numbered as Rewrite and Mark number them. The click map shows such a row as one entry.
func Trackable ¶
Trackable says whether a link goes through the click redirect. Anchors, mailto:, tel:, sms:, javascript: and data: links, the unsubscribe, preference and view-online links, poll and survey answers, Earn's personal links and the Recommendations block's buttons aren't tracked; absolute web links (possibly personalized) are.
Types ¶
type Link ¶
Link is a tracked link: its position among the email's tracked links, its address as written (it may be personalized with Liquid) and its text.
func Edit ¶
Edit is Rewrite where to may keep a link as written (false): its anchor is left byte for byte, and it is numbered and returned all the same.