Jump to content

Passing Keywords In Asynchronous Tags


Recommended Posts

Here's a little background on how I implemented with the Javascript tag. I added a keyword value to the query string this way:

document.write("&keyword=KEYWORD_VALUE");

Then in the delivery options I have a Site - Variable limitation set to check if the Name Contains a value that I am targeting.

 

How can I do this with the asynchronous tag? I tried with the Source setting for the async tag but that doesn't seem to work correctly.

Link to comment
Share on other sites

I think I have it working by passing custom variables in the data-revive-source attribute of the <ins> tag. Does any one know of a reason that I shouldn't be putting this type of data in the source field?

 

Also, I noticed that when I have multiple ads on a page that the asyncjs.php file should only be loaded once after all the ad spots. Can someone confirm that this is the proper use? I can't find documentation anywhere.

 

 

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

I'd like to reactivate this question. I'm using Site - Variable and need to move this to async implementation. This is how it looks in synchronous spc:

<script type="text/javascript" src="xxx/www/delivery/spcjs.php?id=3&AllowHighAds=false"></script>

I tried your suggestions, i.e.:

<ins .... data-revive-source="AllowHighAds=false"></ins>
<ins .... data-revive-AllowHighAds="false"></ins>

and even

<ins .... AllowHighAds="false"></ins>

or calling asyncjs with parameter:

<script async src="xxx/www/delivery/asyncjs.php?AllowHighAds=false"></script>

None of these work :( I can't find any documentation as well. Please advise.

 

Thanks!

 

edit:

 

Seems that site variables are case sensitive but you cannot pass uppercase letters using new async tags. So this is why it didn't work for me. After changing the variable name to all-lowercase it works fine using this method:

 

data-revive-allowhighads="false"

 

Also worth mentioning is that you should only specify given variable once on a page. Previously you passed variables in the page head using spcjs.php call so it was impossible to overwrite, now you pass them using invidual zone tags but they actually have global scope (for all zones on a page). Quite confusing actually... You can easily overwrite the variable by some different zone.

Edited by Docent
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...