Spaces:
Build error
social media output (#5)
Browse files- Add social media section to display marketing insights and data (367f4e661025fdc904785945464f9f908e48ea3e)
- Add content section to display digital marketing insights and analysis (c812c287cdb47d97a8890a575ec22e250d5960fd)
- Update error message in get_analyst_response for clarity and comment out marketplace data retrieval in output.py (cb73b2fc8052e5e6b3128536baab0e7b95df1d80)
- Add icons to buttons for improved user experience in analyzing_page and home (74ecf43ecace275c9c8e4e7edc68f5014a6034bd)
- Add icons to buttons for improved user experience in home and output pages (be5c2253a812f079ad67c393aa22bc9b86c2df6f)
- Update display_outputs to include client website in the digital marketing audit header (37b4050b7141b68660d913f4acb44aa132e93ea5)
- Enhance digital marketing audit output with additional insights and structured content sections (3445bb28edced3107a2ba66626285fb4330ed731)
- Refactor marketplace data retrieval logic and add conversion activation sections to the digital marketing audit output (67b44b509108882a4fe6bc08b65da429fcb3cacb)
- Update client footprint and snapshot by channel sections to indicate content is to be determined (84627a6915cafce184342e6634df561f779a3f49)
- Enhance button functionality in DigitalFootprintDashboard to use full container width for improved layout (5c823008f609fa7cba64c1d94681eeb9132a4e2d)
- Add separator and success message after analysis completion in run_analysis function (f98533ff087621799ca078a9787abaee09b93a45)
- Add "Go to top" links for improved navigation in display_outputs function (c48a15e2394d238e3c3d05f2c61b3a0102a8c2b9)
- Refactor target market and content analysis sections to retrieve and display data dynamically (213993b741503909031534339014400f1167490c)
- helper/data_field.py +1 -1
- pages/analyzing_page.py +2 -1
- pages/home.py +2 -2
- pages/output.py +122 -6
|
@@ -21,7 +21,7 @@ def get_analyst_response(data_src):
|
|
| 21 |
if x and "result" in x:
|
| 22 |
return x["result"]
|
| 23 |
else:
|
| 24 |
-
print(f"No matching document or 'result' field found for data_src: {data_src} in df_response")
|
| 25 |
return None # Return None if no doc or 'result' field found
|
| 26 |
finally:
|
| 27 |
if myclient:
|
|
|
|
| 21 |
if x and "result" in x:
|
| 22 |
return x["result"]
|
| 23 |
else:
|
| 24 |
+
print(f"No matching document or 'result' field found for data_src: {data_src} in df_response. 404")
|
| 25 |
return None # Return None if no doc or 'result' field found
|
| 26 |
finally:
|
| 27 |
if myclient:
|
|
@@ -190,9 +190,10 @@ def run_analysis():
|
|
| 190 |
marketplace_thread.join()
|
| 191 |
target_market_thread.join()
|
| 192 |
|
|
|
|
| 193 |
st.success("🎉 All analyses completed!") # Final success message
|
| 194 |
# --- Display Button After Completion ---
|
| 195 |
-
if st.button("View Results"):
|
| 196 |
st.switch_page("pages/output.py")
|
| 197 |
|
| 198 |
# Execute the analysis
|
|
|
|
| 190 |
marketplace_thread.join()
|
| 191 |
target_market_thread.join()
|
| 192 |
|
| 193 |
+
st.markdown("---")
|
| 194 |
st.success("🎉 All analyses completed!") # Final success message
|
| 195 |
# --- Display Button After Completion ---
|
| 196 |
+
if st.button("View Results", icon="📃"):
|
| 197 |
st.switch_page("pages/output.py")
|
| 198 |
|
| 199 |
# Execute the analysis
|
|
@@ -46,14 +46,14 @@ class DigitalFootprintDashboard:
|
|
| 46 |
|
| 47 |
with col1:
|
| 48 |
|
| 49 |
-
self.upload_file_button = st.button("
|
| 50 |
if self.upload_file_button == True:
|
| 51 |
st.session_state["analyze"] = 'clicked'
|
| 52 |
unhide_button()
|
| 53 |
else:
|
| 54 |
st.session_state["analyze"] = ''
|
| 55 |
|
| 56 |
-
self.analyze_button = st.button("Analyze")
|
| 57 |
if self.analyze_button == True:
|
| 58 |
st.switch_page("pages/analyzing_page.py")
|
| 59 |
else:
|
|
|
|
| 46 |
|
| 47 |
with col1:
|
| 48 |
|
| 49 |
+
self.upload_file_button = st.button("Sync Data", st.session_state['analyze'], icon="🔄", use_container_width=True)
|
| 50 |
if self.upload_file_button == True:
|
| 51 |
st.session_state["analyze"] = 'clicked'
|
| 52 |
unhide_button()
|
| 53 |
else:
|
| 54 |
st.session_state["analyze"] = ''
|
| 55 |
|
| 56 |
+
self.analyze_button = st.button("Analyze", icon="✨", use_container_width=True)
|
| 57 |
if self.analyze_button == True:
|
| 58 |
st.switch_page("pages/analyzing_page.py")
|
| 59 |
else:
|
|
@@ -115,14 +115,16 @@ def seo_on_page_table(df_data):
|
|
| 115 |
|
| 116 |
|
| 117 |
def display_outputs():
|
|
|
|
| 118 |
client_name = "RMX Creatives"
|
|
|
|
| 119 |
overview = f"""**{client_name}** is a financial services company based in Auckland, New Zealand, specializing in providing quick and flexible loan solutions for businesses and individuals. Represented by Paul Stone, LoansOne has enlisted ShoreMarketing to perform a deep dive into their digital footprint to have a view of the holistic status of their digital properties and determine how each property can play part in implementing a stronger digital marketing plan.\n
|
| 120 |
The Digital Marketing Footprint consists of deep-dive research by ShoreMarketing specialists to help the business leaders of LoansOne understand the effectiveness of their existing digital initiatives with the view of giving them an insight to developing a strategy and effectively allocating business resources to digital properties that will give them the best results.\n
|
| 121 |
This document represents the results of our audit of LoansOne’s digital marketing and management practices. Our audit covered reviews of key digital areas: Website and Tools, PPC/SEM, SEO, Social Media, and Market Places."""
|
| 122 |
|
| 123 |
|
| 124 |
st.markdown("# Digital Marketing Audit")
|
| 125 |
-
st.markdown(f"{client_name}")
|
| 126 |
st.write("")
|
| 127 |
st.write("")
|
| 128 |
st.write("")
|
|
@@ -134,11 +136,11 @@ This document represents the results of our audit of LoansOne’s digital market
|
|
| 134 |
st.markdown("---")
|
| 135 |
|
| 136 |
st.markdown("### CLIENT FOOTPRINT")
|
| 137 |
-
st.
|
| 138 |
st.markdown("---")
|
| 139 |
|
| 140 |
-
st.markdown("### SNAPSHOT BY CHANNEL")
|
| 141 |
-
st.
|
| 142 |
st.markdown("---")
|
| 143 |
|
| 144 |
st.markdown("## AUDITS PER CHANNEL")
|
|
@@ -150,6 +152,7 @@ In line with this, we have looked into the technology used by **{client_name}**
|
|
| 150 |
website_and_tools_data = get_analyst_response("Website and Tools Analyst")
|
| 151 |
write_table(website_and_tools_data)
|
| 152 |
|
|
|
|
| 153 |
st.markdown("---")
|
| 154 |
|
| 155 |
st.markdown("### SEARCH ENGINE MARKETING/PPC")
|
|
@@ -158,9 +161,10 @@ With several businesses out there all vying for the same eyeballs, it’s never
|
|
| 158 |
Currently, {client_name} has already explored numerous online advertising. Its competitors are also experienced in PPC in multiple platforms. """)
|
| 159 |
|
| 160 |
# Write SEM Table
|
| 161 |
-
sem_data = get_analyst_response("SEM
|
| 162 |
write_table(sem_data)
|
| 163 |
|
|
|
|
| 164 |
st.markdown("---")
|
| 165 |
|
| 166 |
st.markdown("### SEARCH ENGINE OPTIMIZATION")
|
|
@@ -171,6 +175,7 @@ There are two types of SEO based on where the optimization is implemented: On-pa
|
|
| 171 |
seo_data = get_analyst_response("SEO Analyst")
|
| 172 |
write_table(seo_data)
|
| 173 |
|
|
|
|
| 174 |
st.markdown("---")
|
| 175 |
|
| 176 |
# Write On Page Table
|
|
@@ -178,6 +183,7 @@ There are two types of SEO based on where the optimization is implemented: On-pa
|
|
| 178 |
on_page_data = get_analyst_response("On Page Analyst")
|
| 179 |
seo_on_page_table(on_page_data)
|
| 180 |
|
|
|
|
| 181 |
st.markdown("---")
|
| 182 |
|
| 183 |
# Write Off Page Table
|
|
@@ -185,8 +191,118 @@ There are two types of SEO based on where the optimization is implemented: On-pa
|
|
| 185 |
on_page_data = get_analyst_response("Off Page Analyst")
|
| 186 |
seo_on_page_table(on_page_data)
|
| 187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
st.markdown("---")
|
| 189 |
|
| 190 |
-
if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
st.switch_page("pages/home.py")
|
| 192 |
display_outputs()
|
|
|
|
| 115 |
|
| 116 |
|
| 117 |
def display_outputs():
|
| 118 |
+
st.markdown("<div id='top'></div>", unsafe_allow_html=True);
|
| 119 |
client_name = "RMX Creatives"
|
| 120 |
+
client_website = "https://rmxcreatives.com/"
|
| 121 |
overview = f"""**{client_name}** is a financial services company based in Auckland, New Zealand, specializing in providing quick and flexible loan solutions for businesses and individuals. Represented by Paul Stone, LoansOne has enlisted ShoreMarketing to perform a deep dive into their digital footprint to have a view of the holistic status of their digital properties and determine how each property can play part in implementing a stronger digital marketing plan.\n
|
| 122 |
The Digital Marketing Footprint consists of deep-dive research by ShoreMarketing specialists to help the business leaders of LoansOne understand the effectiveness of their existing digital initiatives with the view of giving them an insight to developing a strategy and effectively allocating business resources to digital properties that will give them the best results.\n
|
| 123 |
This document represents the results of our audit of LoansOne’s digital marketing and management practices. Our audit covered reviews of key digital areas: Website and Tools, PPC/SEM, SEO, Social Media, and Market Places."""
|
| 124 |
|
| 125 |
|
| 126 |
st.markdown("# Digital Marketing Audit")
|
| 127 |
+
st.markdown(f"for: **{client_name} ({client_website})**")
|
| 128 |
st.write("")
|
| 129 |
st.write("")
|
| 130 |
st.write("")
|
|
|
|
| 136 |
st.markdown("---")
|
| 137 |
|
| 138 |
st.markdown("### CLIENT FOOTPRINT")
|
| 139 |
+
st.write("TBD")
|
| 140 |
st.markdown("---")
|
| 141 |
|
| 142 |
+
st.markdown("### SNAPSHOT BY CHANNEL")
|
| 143 |
+
st.write("TBD")
|
| 144 |
st.markdown("---")
|
| 145 |
|
| 146 |
st.markdown("## AUDITS PER CHANNEL")
|
|
|
|
| 152 |
website_and_tools_data = get_analyst_response("Website and Tools Analyst")
|
| 153 |
write_table(website_and_tools_data)
|
| 154 |
|
| 155 |
+
st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)
|
| 156 |
st.markdown("---")
|
| 157 |
|
| 158 |
st.markdown("### SEARCH ENGINE MARKETING/PPC")
|
|
|
|
| 161 |
Currently, {client_name} has already explored numerous online advertising. Its competitors are also experienced in PPC in multiple platforms. """)
|
| 162 |
|
| 163 |
# Write SEM Table
|
| 164 |
+
sem_data = get_analyst_response("SEM/PPC Analyst")
|
| 165 |
write_table(sem_data)
|
| 166 |
|
| 167 |
+
st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)
|
| 168 |
st.markdown("---")
|
| 169 |
|
| 170 |
st.markdown("### SEARCH ENGINE OPTIMIZATION")
|
|
|
|
| 175 |
seo_data = get_analyst_response("SEO Analyst")
|
| 176 |
write_table(seo_data)
|
| 177 |
|
| 178 |
+
st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)
|
| 179 |
st.markdown("---")
|
| 180 |
|
| 181 |
# Write On Page Table
|
|
|
|
| 183 |
on_page_data = get_analyst_response("On Page Analyst")
|
| 184 |
seo_on_page_table(on_page_data)
|
| 185 |
|
| 186 |
+
st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)
|
| 187 |
st.markdown("---")
|
| 188 |
|
| 189 |
# Write Off Page Table
|
|
|
|
| 191 |
on_page_data = get_analyst_response("Off Page Analyst")
|
| 192 |
seo_on_page_table(on_page_data)
|
| 193 |
|
| 194 |
+
st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)
|
| 195 |
+
st.markdown("---")
|
| 196 |
+
|
| 197 |
+
# Write SocMed Table
|
| 198 |
+
st.markdown("### SOCIAL MEDIA")
|
| 199 |
+
st.markdown(f"""Social Media Marketing for the B2B industry is tricky. While B2C businesses can easily have millions of fans through social media, B2B lead generation such as {client_name} sources from a significantly smaller market.
|
| 200 |
+
|
| 201 |
+
Regardless, it is still a great channel worth investing to improve a business’ lead generation if handled correctly. {client_name}, along with its competitors, are found to be using different social media platforms to extend their brand presence. """)
|
| 202 |
+
social_media_data = get_analyst_response("Social Media Analyst")
|
| 203 |
+
write_table(social_media_data)
|
| 204 |
+
|
| 205 |
+
st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)
|
| 206 |
+
st.markdown("---")
|
| 207 |
+
|
| 208 |
+
# Write SocMed Table
|
| 209 |
+
st.markdown("### CONTENT")
|
| 210 |
+
st.markdown(f"""Content is king in digital marketing. People log into the internet to look for and consume information in different formats: text-based, video, audio, or image. Content is what help businesses establish their expertise in the industry, convert leads into customers, guide their customers through their sales funnel, and build relationships with their customers. """)
|
| 211 |
+
content_data = get_analyst_response("Content Analyst")
|
| 212 |
+
write_table(content_data)
|
| 213 |
+
st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)
|
| 214 |
st.markdown("---")
|
| 215 |
|
| 216 |
+
if (get_analyst_response("Marketplace Analyst")):
|
| 217 |
+
st.markdown("### MARKET PLACE")
|
| 218 |
+
marketpalce_data = get_analyst_response("Marketplace Analyst")
|
| 219 |
+
write_table(marketpalce_data)
|
| 220 |
+
st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)
|
| 221 |
+
st.markdown("---")
|
| 222 |
+
|
| 223 |
+
|
| 224 |
+
st.markdown("## OTHER INFORMATION")
|
| 225 |
+
st.markdown("### DIGITAL MARKETING APPROACH: CUSTOMER CENTRIC INBOUND MARKETING")
|
| 226 |
+
st.markdown(f"""Digital Marketing is often called in-bound marketing in a sense that it is not intrusive: a person must search for the information before the marketing stimulus is served to them. Unlike the traditional offline marketing which is more brand-centric in style and intrusive (they are served to you even though you did not intend to see the marketing stimulus), digital marketing is customer-centric: it takes into account the needs, thoughts, and considerations of the customer in all stages in the sales funnel while strategically serving them the appropriate content at the right time, at the right frequency, and through the correct channel. We suggest that {client_name} looks into the details below with the view of understanding where the brand’s footing is in some stages in their customer’s decision and buying journey. """)
|
| 227 |
+
|
| 228 |
+
|
| 229 |
+
|
| 230 |
+
target_market_data = get_analyst_response("Target Market Analyst")
|
| 231 |
+
st.markdown("##### TARGET MARKET")
|
| 232 |
+
st.write(target_market_data['target_market'])
|
| 233 |
+
|
| 234 |
+
st.markdown("##### PRODUCT/SERVICE DEMOGRAPHICS")
|
| 235 |
+
st.write(target_market_data['demographics'])
|
| 236 |
+
|
| 237 |
+
st.markdown("##### MARKETING MESSAGE SUMMARY")
|
| 238 |
+
st.write(target_market_data['summary'])
|
| 239 |
+
|
| 240 |
+
st.markdown("##### WHAT IS THE DESIRED OUTCOMES OF DIGITAL MARKETING?")
|
| 241 |
+
st.write("TBD")
|
| 242 |
+
|
| 243 |
+
st.markdown("##### WHAT IS THE PULL-THROUGH OFFER?")
|
| 244 |
+
st.write(get_analyst_response("Pull through offers Analyst"))
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
st.markdown("##### WEBSITE AUDIENCE ACQUISITION")
|
| 248 |
+
st.write(get_analyst_response("Website Audience Acquisition Analyst"))
|
| 249 |
+
|
| 250 |
+
#LLD/PM/LN
|
| 251 |
+
lld_data = get_analyst_response("LLD/PM/LN Analyst")
|
| 252 |
+
st.markdown("##### LEAD LIST DEVELOPMENT")
|
| 253 |
+
st.write(lld_data.get('lead_list_development', None))
|
| 254 |
+
|
| 255 |
+
st.markdown("##### PROSPECTING MECHANISM")
|
| 256 |
+
st.write(lld_data.get('prospecting_mechanism', None))
|
| 257 |
+
|
| 258 |
+
st.markdown("##### LEAD NURTURING")
|
| 259 |
+
st.write(lld_data.get('lead_nurturing', None))
|
| 260 |
+
|
| 261 |
+
st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)
|
| 262 |
+
st.markdown("---")
|
| 263 |
+
|
| 264 |
+
|
| 265 |
+
st.markdown("#### CONTENT - PROCESS AND ASSETS")
|
| 266 |
+
st.write(f"""Content is king in digital marketing. People log into the internet to look for and consume information in different formats: text-based, video, audio, or image. Content is what help businesses establish their expertise in the industry, convert leads into customers, guide their customers through their sales funnel, and build relationships with their customers. \n
|
| 267 |
+
We have evaluated the process of content development strategy and existing content assets of {client_name} based on how they serve clients throughout the customer journey. """)
|
| 268 |
+
|
| 269 |
+
|
| 270 |
+
pna_data = get_analyst_response("Content - Process and Assets Analyst")
|
| 271 |
+
if pna_data:
|
| 272 |
+
st.markdown("##### AWARENESS STAGE")
|
| 273 |
+
st.write(pna_data.get('awareness_stage', 'N/A'))
|
| 274 |
+
st.markdown("##### CONSIDERATION STAGE")
|
| 275 |
+
st.write(pna_data.get('consideration_stage', 'N/A'))
|
| 276 |
+
st.markdown("##### DECISION STAGE")
|
| 277 |
+
st.write(pna_data.get('decision_stage', 'N/A'))
|
| 278 |
+
|
| 279 |
+
else:
|
| 280 |
+
st.markdown("##### AWARENESS STAGE")
|
| 281 |
+
st.write(None)
|
| 282 |
+
st.markdown("##### CONSIDERATION STAGE")
|
| 283 |
+
st.write(None)
|
| 284 |
+
st.markdown("##### DECISION STAGE")
|
| 285 |
+
st.write(None)
|
| 286 |
+
|
| 287 |
+
st.markdown("---")
|
| 288 |
+
st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)
|
| 289 |
+
|
| 290 |
+
st.markdown("#### CONVERSION – ACTIVATION OF VISITORS")
|
| 291 |
+
st.markdown("##### AWARENESS TO TRAFFIC")
|
| 292 |
+
st.write("TBD")
|
| 293 |
+
st.markdown("##### TRAFFIC TO LEAD CONVERSION")
|
| 294 |
+
st.write("TBD")
|
| 295 |
+
st.markdown("##### LEAD TO SALES CONVERSION")
|
| 296 |
+
st.write("TBD")
|
| 297 |
+
st.markdown("##### CONVERSION TO BRAND LOYALTY")
|
| 298 |
+
st.write("TBD")
|
| 299 |
+
|
| 300 |
+
st.markdown("##### CONNECTION OF ALL ONLINE AND OFFLINE TOUCH POINTS")
|
| 301 |
+
st.write("TBD")
|
| 302 |
+
|
| 303 |
+
st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)
|
| 304 |
+
|
| 305 |
+
|
| 306 |
+
if st.button("Back to Dashboard", icon="🏠"):
|
| 307 |
st.switch_page("pages/home.py")
|
| 308 |
display_outputs()
|