Make Exact-Close varient script error

34 views
Skip to first unread message

jamess...@gmail.com

unread,
May 23, 2024, 7:47:51 PM5/23/24
to Google Ads Scripts Forum
I have used many scripts, but on a copy basis but not very knowledgeable.I am getting an error with this new script that I want to email me the close variant search terms so I can decide if they need to be negatives.
Error: ReferenceError: hasWordInCommon is not defined at main (Code:157:9) at Object.<anonymous> (adsapp_compiled:20513:54)

Any advice showing me how to problem solve this would be appreciated.

Nils Rooijmans

unread,
May 24, 2024, 2:54:11 AM5/24/24
to Google Ads Scripts Forum
if you are referring to this script (https://searchengineland.com/when-exact-match-isnt-exact-anymore-a-script-to-regain-control-307975) , please note that  hasWordInCommon  is a reference to a function that is defined at a lower position in the code (line 316). Most probably you didn't copy-paste all of the code into your script?

Hope this helps,

Nils Rooijmans
https://nilsrooijmans.com
See my Google Ads Scripts FAQ to avoid the same mistakes I made: https://nilsrooijmans.com/google-ads-scripts-faq/

Google Ads Scripts Forum Advisor

unread,
May 24, 2024, 4:06:41 AM5/24/24
to adwords...@googlegroups.com

Hi,

Thank you for reaching out to the Google Ads Scripts support team.

I would like to inform you that the error “ReferenceError: hasWordInCommon is not defined” indicates that the variable ‘hasWordInCommon’ is not declared or not initialized to any value. Kindly check if the variable is defined correctly.

I hope this helps. If you still face any issue, get back to us with the below details so that we can assist you further.

  • Google Ads account ID/CID
  • Name of the affected script
  • Shareable spreadsheet link if you are using it in the script

You can share the requested details via Reply privately to the author option or a direct private reply to this email.

This message is in relation to case "ref:!00D1U01174p.!5004Q02tJ57I:ref" (ADR-00236321)

Thanks,
 
Google Logo Google Ads Scripts Team


Reply all
Reply to author
Forward
0 new messages