Skip to content

Commit 16747e6

Browse files
authored
Merge pull request #2389 from segmentio/trackLink-functionality-update
Track link functionality documentation update
2 parents fc114f9 + dbc3358 commit 16747e6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To upgrade a source to Analytics.js 2.0:
1717
6. Open the Debugger to ensure that events are flowing as expected.
1818

1919
> info ""
20-
> If you set `'Segment.io:' false` in the integrations object, Analytics.js 2.0 drops the event before it reaches the Source Debugger.
20+
> If you set `'Segment.io:' false` in the integrations object, Analytics.js 2.0 drops the event before it reaches the Source Debugger.
2121
2222
## Automatic migration
2323

@@ -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 a non-link element, an additional search of that element’s children occurs for any nested links and fires track calls based on 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)