The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Web Design
    4. Script tags and seo

    Script tags and seo

    Web Design
    6 3 1.8k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • madegood
      madegood last edited by

      Hi,

      I have a page on my site with a google map embed, and a path drawn on the map. The path is made from a long string of coordinates. For ease I have the co-ordinates placed in a script tag at the foot of the page, amongst my javascript

      My question is, will this script tag hurt the seo for the page? I've read that inline js and 'data islands' can be bad, so I've been careful to keep it out of the main body of the page. Thanks, any help appreciated!

      1 Reply Last reply Reply Quote 0
      • FedeEinhorn
        FedeEinhorn last edited by

        Inline scripts are bad if you are bringing them on every page, if that's the case, just use scrip embedding so users don't need to download the scripts EVERY time they see a page.

        But, if the inline script is used only on a specific page and not reused, then there's no reason to load it as an external file. In my opinion, that will even need an extra server call to bring a code that only works on that page.

        Hope that helps!

        1 Reply Last reply Reply Quote 0
        • madegood
          madegood last edited by

          Thanks Federico.

          As my script is being called at the bottom of the page, I would assume it doesn't count as 'inline'?

          Yes the scripts are only being used once on specific pages.

          FedeEinhorn 1 Reply Last reply Reply Quote 0
          • FedeEinhorn
            FedeEinhorn @madegood last edited by

            Yes, that's an inline script (putting it at the top or bottom will still be inline), but as I said, if only one page is using that script, you are good to go. There's nothing bad in using inline scripts if they aren't going to be used on other pages as well.

            1 Reply Last reply Reply Quote 0
            • madegood
              madegood last edited by

              Okay great, that's very helpful.

              What if I wanted to have multiple scripts, say, for points of interest along the route, and had multiple (20+) tags at the bottom of the page? Would this be an ugly way of doing it, or considered totally okay in the eyes of google?

              KristinaKledzik 1 Reply Last reply Reply Quote 0
              • KristinaKledzik
                KristinaKledzik @madegood last edited by

                Inline scripts aren't bad per se, search engines just can't always understand them. Worst case scenario: you have extra code that Google has to crawl but doesn't understand, which takes up bandwidth and doesn't add value. But, it won't lower your rankings.

                So, do whatever you need to do to deliver the best user experience you can on your site with this map and related route, and figure that Google will ignore it (Google is trying to understand it, though, so it may be helpful in the long run). Then, for search engines, include some text content describing the map and the route so that search engines can send the right searchers to your page.

                Good luck!

                Kristina

                1 Reply Last reply Reply Quote 1
                • 1 / 1
                • First post
                  Last post
                • Have Your Thoughts Changed Regarding Canonical Tag Best Practice for Pagination? - Google Ignoring rel= Next/Prev Tagging
                  Mat_C
                  Mat_C
                  1
                  3
                  76

                • Alt tag for SEO
                  aplnzoctober18
                  aplnzoctober18
                  0
                  3
                  59

                • Wordpress SEO/Tag plugin recommendation for sports (soccer) website
                  LayGiri
                  LayGiri
                  1
                  2
                  323

                • Changing from All-in-One SEO to Yoast SEO
                  ThompsonPaul
                  ThompsonPaul
                  0
                  3
                  708

                • So apparently SEO moz will get us de-indexed according to a SEO company!
                  Marcus_Miller
                  Marcus_Miller
                  0
                  6
                  594

                • Missing Meta Description Tag - Wordpress Tag
                  jonnyholt
                  jonnyholt
                  0
                  6
                  6.0k

                • To many scripts in my homepage. This is a problem in SEO?
                  Naghirniac
                  Naghirniac
                  0
                  5
                  390

                • Java-script slider & H1 tags
                  GraphicMail
                  GraphicMail
                  0
                  4
                  1.8k

                Get started with Moz Pro!

                Unlock the power of advanced SEO tools and data-driven insights.

                Start my free trial
                Products
                • Moz Pro
                • Moz Local
                • Moz API
                • Moz Data
                • STAT
                • Product Updates
                Moz Solutions
                • SMB Solutions
                • Agency Solutions
                • Enterprise Solutions
                • Digital Marketers
                Free SEO Tools
                • Domain Authority Checker
                • Link Explorer
                • Keyword Explorer
                • Competitive Research
                • Brand Authority Checker
                • Local Citation Checker
                • MozBar Extension
                • MozCast
                Resources
                • Blog
                • SEO Learning Center
                • Help Hub
                • Beginner's Guide to SEO
                • How-to Guides
                • Moz Academy
                • API Docs
                About Moz
                • About
                • Team
                • Careers
                • Contact
                Why Moz
                • Case Studies
                • Testimonials
                Get Involved
                • Become an Affiliate
                • MozCon
                • Webinars
                • Practical Marketer Series
                • MozPod
                Connect with us

                Contact the Help team

                Join our newsletter
                Moz logo
                © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                • Accessibility
                • Terms of Use
                • Privacy