Jump to content

How to use variables in Advertisement?


dba

Recommended Posts

There is a need to use variables in advertising (to pass the subid to the advertising widget). But advertising is displayed "as is" and does not accept variables.
Is there any solution for this issue?

Link to comment
Share on other sites

Advertising can use dynamic variables that are passed in URL.

For example if you need to use variable passed like

https://www.domain.com/?adv=555

Then go to Settings -> Website settings and under Dynamic HTTP parameters add this:
adv

and specify its default value (something that should be printed in advertising if no ?adv=555 parameter is passed in URL.

Then in advertising code you can use this:
<ins class="adsbyexoclick" data-zoneid="xxx" data-sub="%adv%"></ins>

If user comes with
https://www.domain.com/?adv=555

then it will be displayed like
<ins class="adsbyexoclick" data-zoneid="xxx" data-sub="555"></ins>

otherwise it will take the default value that you configured.

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...