Need to install code at beginning of body

Permalink Browser Info Environment
I need to install tag manager code at beginning of body. Where can I install this? I could not find the appropriate php file to edit with the <body>. Thanks in advance.

Type: Ticket
Status: Resolved
bhans
View Replies:
Xanweb replied on at Permalink Reply
Xanweb
Hello,

You can do that via dashboard.
Navigate to Dashboard > System & Settings > SEO & Statistics > Tracking Codes.
Put your code in the "Header Tracking Codes" Text area and save.

Kind regards,
Xanweb Support Team
bhans replied on at Permalink Reply
bhans
So, I'm trying to ensure my Google Tag Manager is installed correctly. It says to put one code as high in the <head> of the page as possible, and the other code immediately after the opening <body> tag.
I currently have the first part of code in the <tracking codes> section now. I have been putting the second code in the first block I put on the page. I don't think that is what I should be doing.
Xanweb replied on at Permalink Reply
Xanweb
An alternative way, you can override themes/xw_replica_pro/elements/header_top.php file in order to put your custom scripts.
Make sure to put the override under application to avoid losing your changes when we update Replica Pro theme.
bhans replied on at Permalink Reply
bhans
I modified the header and added the other script into tracking codes and it works perfectly. Thanks!

concrete5 Environment Information

# Concrete Version
Core Version - 9.1.3
Version Installed - 9.1.3
Database Version - 20220908074900

# Hostname
1.moritzhandymanservices.com

# Environment
production

# Database Information
Version: 10.4.24-MariaDB
SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

# Concrete Packages
Instant Page Speed Magic (2.0), Open Graph Tags Lite (2.1.6), Replica Pro Theme (2.5.8)

# Concrete Overrides
None

# Concrete Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - On - If blocks on the particular page allow it.
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2

# Server API
fpm-fcgi

# PHP Version
8.0.25

# PHP Extensions
bcmath, calendar, cgi-fcgi, Core, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, redis, Reflection, session, SimpleXML, soap, sockets, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 64M
upload_max_filesize - 256M
zend.exception_string_param_max_len - 0
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
redis.pconnect.connection_limit - 0
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
unserialize_max_depth - 4096
opcache.jit_bisect_limit - 0
opcache.jit_max_exit_counters - 8192
opcache.jit_max_loop_unrolls - 8
opcache.jit_max_polymorphic_calls - 2
opcache.jit_max_recursive_calls - 2
opcache.jit_max_recursive_returns - 2
opcache.jit_max_root_traces - 1024
opcache.jit_max_side_traces - 128
opcache.max_accelerated_files - 4000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.