Skip to content

Commit a4cbcea

Browse files
Adds a blurb about trackLink's update
1 parent c0bcc21 commit a4cbcea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/connections/sources/catalog/libraries/website/javascript/upgrade-to-ajs2.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,7 @@ Analytics.js 2.0 asynchronously loads different pieces of the library as needed.
5454
- `https://cdn.segment.com/v1/projects/<WRITE_KEY>/settings`
5555
- `https://cdn.segment.com/analytics-next/bundles/*`
5656
- `https://cdn.segment.com/next-integrations/integrations/*`
57+
58+
### Using trackLink on elements that are not links
59+
60+
Previously, it was possible to attach `trackLink` to any element, and a trackLink call would fire for that element if it wasn't a link. Now, when you attach `trackLink` to an element, if that element is not a link, an additional search of that element’s children occurs to see if it contains any nested links and fires track calls based off of those links. If you wish to fire track calls on non-link elements that have links as children, you can use a `track` call instead.

0 commit comments

Comments
 (0)