Hi, I would like to add Google Tag Manager code on...
# suitecommerce
t
Hi, I would like to add Google Tag Manager code on whole SCA website pages. I want to add it between
<head>
&
</head>
I attach the script code as well in the thread.
Copy code
<!-- Google Ads gtag START -->
<script async src="<https://www.googletagmanager.com/gtag/js?id=XX-YYYYYYYY>"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'XX-YYYYYYYY');
</script>
<!-- Google Ads gtag END -->
t
@Steve Goldberg Thanks for your comments. I checked blog and it doesn't explain how to embed custom script. Can you guide how to do it?
s
The doc I linked to was for our recommend approach, which is to use the SuiteApp to inject the GTM code
If you're deadset on editing the code directly, against our advice, then you will need to edit the SSP files in the SCA code and deploy them there, as they are what generate the frame pages that include the head tags.
t
I see. How can I approach 2nd method? edit the SSP files
s
Your responses are not filling me with confidence. I would advise spending some time getting up to speed with the SuiteCommerce developer tools, environment and doing a course first.
Nonetheless, the developer documentation starts here: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/set_1502135135.html
t
Thanks