Sam wanted to leverage the BIGGER SHARE GUARANTEE (BSG) more prominently across aguiarinjurylawyers.com. A prior audit identified two priorities: (1) a site-wide header/nav BSG banner and (2) a CTA banner BSG update across pages. This session focused on deploying the CTA banner enhancement live using WPCode's global JavaScript injection.
The goal was to inject two new lines into every CTA banner across the site:
These lines appear above the existing "Get more. Get it faster. Get it with Sam Aguiar." subtext in CTA banners.
A PHP snippet titled "BSG CTA Banner Enhancement" is live in WPCode. It uses add_action('wp_footer', ..., 999) to output a <style> block and a <script> block into the page footer. The script targets two different CTA block templates found across the site:
.sa-cta-subtext inside .sa-cta-banner and inserts the BSG lines above it.<section> elements inside .aguiar-landing-page that contain 2+ phone links, then inserts the BSG lines above the phone number container.The snippet is:
WP Rocket's "Delay JavaScript Execution" feature converts the <script> tag to type="rocketlazyloadscript", preventing the BSG injection from running until user interaction (scroll, click). Two exclusion keywords were added to the "Excluded JavaScript Files" field:
addBSGsa-bsg-cta