Getting started
Fork this repository https://github.com/erickouassi/MyAds360/fork in your account.
How to
- First of all, make local copies of my
ad_data.jsonโ๏ธ
and ad_script.jsโ๏ธ
files into a new directory on your local machine.
Open now your own file ad_data.jsonโ๏ธ
,
replace all the value except
"id": "72",
"category": "weekNumber", and
"frequency": "53"
as an example.
Example of ad data:
{
"id": "72",
"created_on": "5/12/2022",
"category": "weekNumber",
"frequency": "53",
"reference": "Referral program",
"adURL": "https://bit.ly/35qVQwT",
"adText": "Hey, we can both earn $10 ...",
"callToAction": "Use my link:",
"company": "PayPal"
},
- Now, go to file
ad_script.jsโ๏ธ
to change the advert to your own.
Example of ad data:
cycleAds = `
<div class="#" style="width:330px;height:auto;background-color:powderblue;padding:5px;">
<span>Hey! I've been using Cash App to send money and spend using the Cash Card. Try it using my code <mark>JCMLKKL</mark> and you'll get $5.
Use my link: <a href='https://bit.ly/3sFOEWm' rel='nofollow'>
<span style="text-decoration: none;">https://bit.ly/3sFOEWm</span></a>
</span></div>`;
-
Add this JavaScript code snippet to any page and your ad will show automatically:
<div>
<script src="./ad_script.js"></script>
<div id="randomTextAd"></div>
</div>
๐ Output Random ad
- That is all! ๐๐ฟ๐๐ฟ๐๐ฟ๐๐ฟ๐๐ฟ
ad_data.jsonโ๏ธ
and ad_script.jsโ๏ธ
files into a new directory on your local machine.Open now your own file ad_data.jsonโ๏ธ
,
replace all the value except
"id": "72",
"category": "weekNumber", and
"frequency": "53"
as an example.
Example of ad data:
{
"id": "72",
"created_on": "5/12/2022",
"category": "weekNumber",
"frequency": "53",
"reference": "Referral program",
"adURL": "https://bit.ly/35qVQwT",
"adText": "Hey, we can both earn $10 ...",
"callToAction": "Use my link:",
"company": "PayPal"
},
ad_script.jsโ๏ธ
to change the advert to your own.Example of ad data:
cycleAds = `
<div class="#" style="width:330px;height:auto;background-color:powderblue;padding:5px;">
<span>Hey! I've been using Cash App to send money and spend using the Cash Card. Try it using my code <mark>JCMLKKL</mark> and you'll get $5.
Use my link: <a href='https://bit.ly/3sFOEWm' rel='nofollow'>
<span style="text-decoration: none;">https://bit.ly/3sFOEWm</span></a>
</span></div>`;
Add this JavaScript code snippet to any page and your ad will show automatically:
<div>
<script src="./ad_script.js"></script>
<div id="randomTextAd"></div>
</div>
๐ Output Random ad
Note on the JavaScript code snippet:
- id="
randomTextAd
" indicates random ad - id="
timeTextAd
" indicates time of day (Morning, Afternoon & Evening) ad - id="
todayTextAd
" indicates daily ad - id="
weeklyTextAd
" indicates weekly ad - id="
monthlyTextAd
" indicates monthly ad