Skip to content

Commit

Permalink
Merge pull request #736 from DTS-STN/aa-double
Browse files Browse the repository at this point in the history
Use next/script and move AA script out of Head
  • Loading branch information
Charles-Pham authored Oct 9, 2024
2 parents b3d899f + d61ef97 commit a2f9b78
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions components/MetaData.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Head from 'next/head'
import Script from 'next/script'

interface Content {
title: string
Expand Down Expand Up @@ -57,16 +58,19 @@ const MetaData = ({ language, data }: MetaDataProps) => {
<meta name="dcterms.creator" content={d.creator} />
<meta name="dcterms.accessRights" content={d.accessRights} />
<meta name="dcterms.service" content={d.service} />
{/* eslint-disable */}

{process.env.ENVIRONMENT === 'production' ? (
<script src="//assets.adobedtm.com/be5dfd287373/9b9cb7867b5b/launch-59d77766b86a.min.js"></script>
) : (
<script src="https://assets.adobedtm.com/be5dfd287373/9b9cb7867b5b/launch-cad75bf2f0d2-staging.min.js"></script>
)}

{/*eslint-enable */}
</Head>

{process.env.ENVIRONMENT === 'production' ? (
<Script
strategy="afterInteractive"
src="//assets.adobedtm.com/be5dfd287373/9b9cb7867b5b/launch-59d77766b86a.min.js"
/>
) : (
<Script
strategy="afterInteractive"
src="https://assets.adobedtm.com/be5dfd287373/9b9cb7867b5b/launch-cad75bf2f0d2-staging.min.js"
/>
)}
</>
)
}
Expand Down

0 comments on commit a2f9b78

Please sign in to comment.