PositionProfile
remains available, as per the job ad lifecycle.
In the event that ad performance data for a requested job ad is unavailable, the panel will manage any errors internally and display appropriate messaging to the hirer.To maintain clarity, we recommend against displaying multiple instances of the Ad Performance Panel on the same page.Review the getting started documentation if you’re new to panels in the SEEK API.The Ad Performance Panel tracks our standard browser support policy.Add the following script tag to the page where the Ad Performance Panel will be displayed:<script
type="text/javascript"
src="https://integration.seek.com/panels/SeekApi.js"
></script>
SeekApi.render
function renders an instance of the panel in the specified DOM element, and should be called on page load or if the currently viewed job ad changes.The render function may throw errors if:containerNode
provided is not a valid HTMLElement
SeekApi.render(containerNode, 'adPerformance', props);
containerNode
–
(DOM Node) The DOM element to render the panel into.'adPerformance'
-
The name of the panel to render.props
–
Props for rendering the panel.containerNode
or its children after
the render
function has been called may lead to
unexpected behaviour.Prop | Type | Description |
---|---|---|
getAuthToken | () => Promise<string> | Function to call to retrieve the browser token to use when calling the SEEK API. |
positionProfileId | string | The identifier of the job ad to be displayed. |
locale | string optional | Specifies the locale to display content in, e.g. en-AU . Supported locales are outlined in the content localisation documentation. |
SeekApi.render(
document.getElementById('seekAdPerformanceContainerDiv'),
'adPerformance',
{
// Function to call to retrieve the browser token to use when calling the
// SEEK API, see "Step 3" for more details.
getAuthToken: () => {
return Promise.resolve('browser token');
},
// Object identifier for the job ad to be displayed.
positionProfileId: 'seekAnzPublicTest:positionProfile:jobAd:2782PZfXV'
}
);
getAuthToken
function passed to it.getAuthToken
will request a token for the new hirer ID before re-rendering the panel.query:advertisement-performance query:position-profiles query:ontologies
scopes.POST https://graphql.seek.com/auth/token HTTP/1.1
Authorization: Bearer PARTNER_TOKEN_HERE
Content-Type: application/json
User-Agent: YourPartnerService/1.2.3
{
"hirerId": "seekAnzPublicTest:organization:seek:93WyyF1h",
"scope": "query:advertisement-performance query:position-profiles query:ontologies",
"userId": "317665"
}
getAuthToken
function.[TEST PANEL]
.
Viewing ad performance for a job with this title will display mock data.See our general panel troubleshooting documentation for more information.