Add dynamic meta tags

This commit is contained in:
MD. Ariful Alam
2021-08-25 22:53:07 +06:00
parent 8eb2b4b09f
commit 13111a3106
10 changed files with 178 additions and 60 deletions

View File

@@ -86,13 +86,17 @@ const Blog = () => {
className="card shadow-lg compact bg-base-100 cursor-pointer"
key={index}
onClick={() => {
if (config.googleAnalytics.id) {
ga.event({
action: "Click Blog Post",
params: {
post: article.title
}
});
try {
if (config.googleAnalytics.id) {
ga.event({
action: "Click Blog Post",
params: {
post: article.title
}
});
}
} catch (error) {
console.error(error);
}
window.open(article.link, '_blank')