Generates a <section> Element wrapped in a ContentContext.

TrackedSection: (props: {
objectiv?: {
id?: string,
normalizeId?: boolean,
}) => <section>

objectiv prop attributes

typedefault value
optionalidstringinferred from native id or title
  • When the id attribute is omitted, we attempt to infer it from one of the elements' native props: id or title.

If that fails, an error will be logged to the Developer Console and the original Component is rendered.



Automatic Events


Usage example

import { TrackedSection } from '@objectiv/tracker-react';

<TrackedSection id={'content'}>
<TrackedSection objectiv={{ id: 'sub-section' }}>

By default, all Tracked Elements automatically normalize their Context identifiers to a kebab-cased format.

This can be disabled via the normalizeId option:

import { TrackedSection } from '@objectiv/tracker-react';

<TrackedSection id={'Another Section'} objectiv={{ normalizeId: false }}>

<TrackedSection objectiv={{ id: 'do not normalize', normalizeId: false }}>

Did you know ?

TrackedSection internally uses TrackedContentContext.