Developer Center

Advanced Configuration with HTML

Sometimes it's useful to configure the VigLink JavaScript Library differently for a certain page on your site, or even for just part of a page. For example, you might have VigLink Insert enabled on your site, but have an area where links should never be inserted.

VigLink behavior can be configured by adding certain labels (called CSS "classes") to your site's HTML.

Classes

nolinks
When VigLink Insert is enabled in your settings, nolinks can be used to ensure links are never added to specific parts of a page.
nooptimize
If link optimization is enabled, use nooptimize to ensure certain links are never optimized.
norewrite
VigLink should completely ignore this part of the page. Links will not be inserted, monetized, etc.

Examples

Prevent a single link from being monetized…

<a href="http://example.com" class="norewrite">VigLink ignores this</a>

…or a whole bunch of them:

<p class="norewrite">
  None of these links will be monetized by VigLink. Not
  <a href="http://example.com/1">this one</a>, or
  even <a href="http://example.com/2">that one</a>.
</p>

Prevent link insertion in part of the page:

<div class="nolinks">
  <p>My Nikon D7000 is amazing!</p>
</div>

These classes can be used anywhere in your HTML and affect everything below. That means an entire page can be configured by adding one to the <body/> tag:

<html>
  <body class="nolinks">
    Links won't be inserted anywhere on this page.
  </body>
</html>

If your HTML already has another class where you'd like to use one of ours, just add a space between them. They'll both work as expected:

<p class="myclass noinsert"></p>