Google sheets script

I have started a project where I will be adding my family and friends into spreadsheet posted on a website, tracking how many Instagram followers we gain each hour, each day, split into various sheets.

I want my website to have various sheets & charts with names & details, updated hourly, daily, weekly, monthly & yearly. So far this Google Sheet script only feeds the date & time but doesn’t replace. Does anyone know how to help?

Google Sheet script:

// the name of the sheet within your document
var sheetName = “Sheet1”;
// the name of the Instagram account you want to track
var instagramAccountName = “kingandmcgaw”;

function insertFollowerCount() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName(this.sheetName);
accountdata = getInstagramData(this.instagramAccountName);
sheet.appendRow([Utilities.formatDate(new Date(), “GMT”, “yyyy-MM-dd”), accountdata.followerCount]);
};

function getInstagramData(username) {
var r = new RegExp(’’ +
‘([^{]+?({.profile_pic_url.})[^}]+?)’ +
‘</script>’);
var url = “https://www.instagram.com/” + username
var source = UrlFetchApp.fetch(url).getContentText();
var jsonStr = source.match®[2];
var data = JSON.parse(jsonStr);
console.log(‘data’, data);
var oldVariantOfData = data[‘entry_data’][‘ProfilePage’][0];
console.log(‘oldVariantOfData’, oldVariantOfData);

return {
followerCount : oldVariantOfData.graphql.user.edge_followed_by.count,
followCount : oldVariantOfData.graphql.user.edge_follow.count,
mediaCount : oldVariantOfData.graphql.user.edge_owner_to_timeline_media.count
};
}