• University
  • Login
  • Support
  • Docs
  • About
  • Contact
  • Webinar
  • Blog
OptinMonster
  • Solutions
    • BY INDUSTRY
      • eCommerce
      • Publishers
      • Agencies
    • BY SOLUTION
      • Grow Your Email List
      • Reduce Cart Abandonment
      • Increase Sales Conversion
  • Features
  • Pricing
  • Testimonials
  • Get Started
☰

Search Docs

Cancel Search

    OM Documentation Extending

    How to Add JavaScript to Your WordPress Site

    You may need to add Javascript to your WordPress site. For example, if you are using our Javascript Events API to further customize your OptinMonster campaign’s functionality.

    We recommend following the suggestions outlined in WPBeginner’s How to Easily Add JavaScript in WordPress Pages or Posts (3 Methods) guide.

    Technical Support

    Still have some questions? We are here to help you succeed.

    Open a support ticket.

    Was this article helpful?
    Thanks for letting us know.
    This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
    Thanks for your feedback.

    Fantastic! You've been so helpful to let us know how we are doing - would you give us a 5-star rating on TrustPilot? It takes 90 seconds or less, and we love to know when we've done a good job. Thanks in advance!

    Rate OptinMonster

    Last updated on May 25, 2021
    TOP

    Related Docs

    • How to Use a Custom Font

      While OptinMonster provides many fonts for you to use when designing your campaign, we also make…

    • Using the OptinMonster API with Single Page Applications

      OptinMonster works on almost any website, including Single Page Applications. In this article, we’ll provide some…

    • Using the Facebook Pixel with OptinMonster

      OptinMonster makes it easy to integrate the Facebook Pixel with your campaigns. In this article, you’ll…

    • Add Pinterest Conversion Tag

      OptinMonster makes it easy to add the Pinterest Conversion Tag to campaigns using our Success Triggered…

    Get More Subscribers & Customers NOW

    Unleash the power of OptinMonster on your website today!

    Get Started Now
    300+ 5-star ratings
    14 day money-back guarantee
    Trusted by 1m+ websites
    Company
    • University
    • Press
    • Testimonials
    • About
    • Contact
    • Blog
    • Affiliates
    • Careers
    Top Features
    • Lightbox Popup
    • Exit-Intent® Technology
    • Fullscreen Welcome Mat
    • Floating Bar
    • Slide-in Scroll Box
    • Inline Forms
    • A/B Testing
    • Conversion Analytics
     
    • Yes / No Forms
    • OnSite Retargeting®
    • MonsterLinks™
    • MonsterEffects™
    • Page-Level Targeting
    • Geo-Location Targeting
    • OnSite Follow Up Campaigns®
    • InactivitySensor™
    Helpful Links
    • Login
    • Support
    • Documentation
    • Plans and Pricing
    • Product Tour
    • Integrations
    • Popup Examples
    • OptinMonster Alternatives
    OptinMonster Logo
    Copyright © 2013 - 2023 Retyp, LLC.
    OptinMonster®, Exit Intent®, OnSite Retargeting® and OnSite Follow Up Campaign® are registered trademarks of Retyp, LLC.

    Our Sites TrustPulse WPForms MonsterInsights WPBeginner All In One SEO IsItWP SeedProd WP Mail SMTP RafflePress

    • Terms of Service
    • Privacy Policy
    • Security
    • GDPR
    • Sitemap
    • OptinMonster Coupon
    OptinMonster is secure!
    [wpforms id="113407"]
    <div class="wpforms-container " id="wpforms-113407"><form id="wpforms-form-113407" class="wpforms-validate wpforms-form" data-formid="113407" method="post" enctype="multipart/form-data" action="/docs/adding-javascript-to-your-wordpress-site/" data-token="b7742cce476a9b0c27cd1e64ba1b2597"><noscript class="wpforms-error-noscript">Please enable JavaScript in your browser to complete this form.</noscript><div class="wpforms-field-container"><div id="wpforms-113407-field_0-container" class="wpforms-field wpforms-field-name" data-field-id="0"><label class="wpforms-field-label" for="wpforms-113407-field_0">Name <span class="wpforms-required-label">*</span></label><input type="text" id="wpforms-113407-field_0" class="wpforms-field-medium wpforms-field-required" name="wpforms[fields][0]" required></div><div id="wpforms-113407-field_1-container" class="wpforms-field wpforms-field-email" data-field-id="1"><label class="wpforms-field-label" for="wpforms-113407-field_1">Email <span class="wpforms-required-label">*</span></label><input type="email" id="wpforms-113407-field_1" class="wpforms-field-medium wpforms-field-required" name="wpforms[fields][1]" required></div><div id="wpforms-113407-field_2-container" class="wpforms-field wpforms-field-textarea" data-field-id="2"><label class="wpforms-field-label" for="wpforms-113407-field_2">Message <span class="wpforms-required-label">*</span></label><textarea id="wpforms-113407-field_2" class="wpforms-field-small wpforms-field-required" name="wpforms[fields][2]" required></textarea></div></div><div class="wpforms-field wpforms-field-hp"><label for="wpforms-113407-field-hp" class="wpforms-field-label">Email</label><input type="text" name="wpforms[hp]" id="wpforms-113407-field-hp" class="wpforms-field-medium"></div><div class="wpforms-submit-container"><input type="hidden" name="wpforms[id]" value="113407"><input type="hidden" name="wpforms[author]" value="4657"><input type="hidden" name="wpforms[post_id]" value="92860"><button type="submit" name="wpforms[submit]" id="wpforms-submit-113407" class="wpforms-submit om-trigger-conversion" data-alt-text="Sending..." data-submit-text="Submit" aria-live="assertive" value="wpforms-submit">Submit</button></div></form></div> <!-- .wpforms-container -->
    [wpforms id="113407"]
    <div class="wpforms-container " id="wpforms-113407"><form id="wpforms-form-113407" class="wpforms-validate wpforms-form" data-formid="113407" method="post" enctype="multipart/form-data" action="/docs/adding-javascript-to-your-wordpress-site/" data-token="b7742cce476a9b0c27cd1e64ba1b2597"><noscript class="wpforms-error-noscript">Please enable JavaScript in your browser to complete this form.</noscript><div class="wpforms-field-container"><div id="wpforms-113407-field_0-container" class="wpforms-field wpforms-field-name" data-field-id="0"><label class="wpforms-field-label" for="wpforms-113407-field_0">Name <span class="wpforms-required-label">*</span></label><input type="text" id="wpforms-113407-field_0" class="wpforms-field-medium wpforms-field-required" name="wpforms[fields][0]" required></div><div id="wpforms-113407-field_1-container" class="wpforms-field wpforms-field-email" data-field-id="1"><label class="wpforms-field-label" for="wpforms-113407-field_1">Email <span class="wpforms-required-label">*</span></label><input type="email" id="wpforms-113407-field_1" class="wpforms-field-medium wpforms-field-required" name="wpforms[fields][1]" required></div><div id="wpforms-113407-field_2-container" class="wpforms-field wpforms-field-textarea" data-field-id="2"><label class="wpforms-field-label" for="wpforms-113407-field_2">Message <span class="wpforms-required-label">*</span></label><textarea id="wpforms-113407-field_2" class="wpforms-field-small wpforms-field-required" name="wpforms[fields][2]" required></textarea></div></div><div class="wpforms-field wpforms-field-hp"><label for="wpforms-113407-field-hp" class="wpforms-field-label">Comment</label><input type="text" name="wpforms[hp]" id="wpforms-113407-field-hp" class="wpforms-field-medium"></div><div class="wpforms-submit-container"><input type="hidden" name="wpforms[id]" value="113407"><input type="hidden" name="wpforms[author]" value="4657"><input type="hidden" name="wpforms[post_id]" value="92860"><button type="submit" name="wpforms[submit]" id="wpforms-submit-113407" class="wpforms-submit om-trigger-conversion" data-alt-text="Sending..." data-submit-text="Submit" aria-live="assertive" value="wpforms-submit">Submit</button></div></form></div> <!-- .wpforms-container -->